Compare commits
No commits in common. 'dev_refactor' and 'main' have entirely different histories.
dev_refact
...
main
@ -1,104 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.controller;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.booksystem.domain.Account;
|
|
||||||
import com.ruoyi.booksystem.service.IAccountService;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 交易账户Controller
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/booksystem/account")
|
|
||||||
public class AccountController extends BaseController
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private IAccountService accountService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询交易账户列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:account:list')")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo list(Account account)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<Account> list = accountService.selectAccountList(account);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出交易账户列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:account:export')")
|
|
||||||
@Log(title = "交易账户", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, Account account)
|
|
||||||
{
|
|
||||||
List<Account> list = accountService.selectAccountList(account);
|
|
||||||
ExcelUtil<Account> util = new ExcelUtil<Account>(Account.class);
|
|
||||||
util.exportExcel(response, list, "交易账户数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取交易账户详细信息
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:account:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(accountService.selectAccountById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增交易账户
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:account:add')")
|
|
||||||
@Log(title = "交易账户", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
|
||||||
public AjaxResult add(@RequestBody Account account)
|
|
||||||
{
|
|
||||||
return toAjax(accountService.insertAccount(account));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改交易账户
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:account:edit')")
|
|
||||||
@Log(title = "交易账户", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody Account account)
|
|
||||||
{
|
|
||||||
return toAjax(accountService.updateAccount(account));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除交易账户
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:account:remove')")
|
|
||||||
@Log(title = "交易账户", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
|
||||||
{
|
|
||||||
return toAjax(accountService.deleteAccountByIds(ids));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,111 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.controller;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.booksystem.domain.Operations;
|
|
||||||
import com.ruoyi.booksystem.service.IOperationsService;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当日操作Controller
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/booksystem/operations")
|
|
||||||
public class OperationsController extends BaseController
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private IOperationsService operationsService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当日操作列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:list')")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo list(Operations operations)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<Operations> list = operationsService.selectOperationsList(operations);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出当日操作列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:export')")
|
|
||||||
@Log(title = "当日操作", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, Operations operations)
|
|
||||||
{
|
|
||||||
List<Operations> list = operationsService.selectOperationsList(operations);
|
|
||||||
ExcelUtil<Operations> util = new ExcelUtil<Operations>(Operations.class);
|
|
||||||
util.exportExcel(response, list, "当日操作数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当日操作详细信息
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(operationsService.selectOperationsById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增当日操作
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:add')")
|
|
||||||
@Log(title = "当日操作", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
|
||||||
public AjaxResult add(@RequestBody Operations operations)
|
|
||||||
{
|
|
||||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
|
||||||
System.out.println("[AccountBookController] userName: " + loginUser.getUsername() + " userId: " + loginUser.getUserId());
|
|
||||||
operations.setUserId(loginUser.getUserId());
|
|
||||||
//插入一条后,要更新持仓表
|
|
||||||
return toAjax(operationsService.insertOperations(operations));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改当日操作
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:edit')")
|
|
||||||
@Log(title = "当日操作", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody Operations operations)
|
|
||||||
{
|
|
||||||
return toAjax(operationsService.updateOperations(operations));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除当日操作
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:operations:remove')")
|
|
||||||
@Log(title = "当日操作", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
|
||||||
{
|
|
||||||
return toAjax(operationsService.deleteOperationsByIds(ids));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,104 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.controller;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.booksystem.domain.Statistics;
|
|
||||||
import com.ruoyi.booksystem.service.IStatisticsService;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 单笔操作统计Controller
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/booksystem/statistics")
|
|
||||||
public class StatisticsController extends BaseController
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private IStatisticsService statisticsService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询单笔操作统计列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:list')")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo list(Statistics statistics)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<Statistics> list = statisticsService.selectStatisticsList(statistics);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出单笔操作统计列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:export')")
|
|
||||||
@Log(title = "单笔操作统计", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, Statistics statistics)
|
|
||||||
{
|
|
||||||
List<Statistics> list = statisticsService.selectStatisticsList(statistics);
|
|
||||||
ExcelUtil<Statistics> util = new ExcelUtil<Statistics>(Statistics.class);
|
|
||||||
util.exportExcel(response, list, "单笔操作统计数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取单笔操作统计详细信息
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(statisticsService.selectStatisticsById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增单笔操作统计
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:add')")
|
|
||||||
@Log(title = "单笔操作统计", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
|
||||||
public AjaxResult add(@RequestBody Statistics statistics)
|
|
||||||
{
|
|
||||||
return toAjax(statisticsService.insertStatistics(statistics));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改单笔操作统计
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:edit')")
|
|
||||||
@Log(title = "单笔操作统计", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody Statistics statistics)
|
|
||||||
{
|
|
||||||
return toAjax(statisticsService.updateStatistics(statistics));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除单笔操作统计
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistics:remove')")
|
|
||||||
@Log(title = "单笔操作统计", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
|
||||||
{
|
|
||||||
return toAjax(statisticsService.deleteStatisticsByIds(ids));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,104 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.controller;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.booksystem.domain.StatisticsRemain;
|
|
||||||
import com.ruoyi.booksystem.service.IStatisticsRemainService;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当日持仓统计Controller
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/booksystem/statisticremain")
|
|
||||||
public class StatisticsRemainController extends BaseController
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private IStatisticsRemainService statisticsRemainService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当日持仓统计列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:list')")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo list(StatisticsRemain statisticsRemain)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<StatisticsRemain> list = statisticsRemainService.selectStatisticsRemainList(statisticsRemain);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出当日持仓统计列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:export')")
|
|
||||||
@Log(title = "当日持仓统计", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, StatisticsRemain statisticsRemain)
|
|
||||||
{
|
|
||||||
List<StatisticsRemain> list = statisticsRemainService.selectStatisticsRemainList(statisticsRemain);
|
|
||||||
ExcelUtil<StatisticsRemain> util = new ExcelUtil<StatisticsRemain>(StatisticsRemain.class);
|
|
||||||
util.exportExcel(response, list, "当日持仓统计数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取当日持仓统计详细信息
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(statisticsRemainService.selectStatisticsRemainById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增当日持仓统计
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:add')")
|
|
||||||
@Log(title = "当日持仓统计", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
|
||||||
public AjaxResult add(@RequestBody StatisticsRemain statisticsRemain)
|
|
||||||
{
|
|
||||||
return toAjax(statisticsRemainService.insertStatisticsRemain(statisticsRemain));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改当日持仓统计
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:edit')")
|
|
||||||
@Log(title = "当日持仓统计", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody StatisticsRemain statisticsRemain)
|
|
||||||
{
|
|
||||||
return toAjax(statisticsRemainService.updateStatisticsRemain(statisticsRemain));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除当日持仓统计
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statisticremain:remove')")
|
|
||||||
@Log(title = "当日持仓统计", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
|
||||||
{
|
|
||||||
return toAjax(statisticsRemainService.deleteStatisticsRemainByIds(ids));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,104 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.controller;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PutMapping;
|
|
||||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
import com.ruoyi.common.annotation.Log;
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.enums.BusinessType;
|
|
||||||
import com.ruoyi.booksystem.domain.StatisticsTotal;
|
|
||||||
import com.ruoyi.booksystem.service.IStatisticsTotalService;
|
|
||||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计当日持仓Controller
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/booksystem/statistictotal")
|
|
||||||
public class StatisticsTotalController extends BaseController
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private IStatisticsTotalService statisticsTotalService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询统计当日持仓列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:list')")
|
|
||||||
@GetMapping("/list")
|
|
||||||
public TableDataInfo list(StatisticsTotal statisticsTotal)
|
|
||||||
{
|
|
||||||
startPage();
|
|
||||||
List<StatisticsTotal> list = statisticsTotalService.selectStatisticsTotalList(statisticsTotal);
|
|
||||||
return getDataTable(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 导出统计当日持仓列表
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:export')")
|
|
||||||
@Log(title = "统计当日持仓", businessType = BusinessType.EXPORT)
|
|
||||||
@PostMapping("/export")
|
|
||||||
public void export(HttpServletResponse response, StatisticsTotal statisticsTotal)
|
|
||||||
{
|
|
||||||
List<StatisticsTotal> list = statisticsTotalService.selectStatisticsTotalList(statisticsTotal);
|
|
||||||
ExcelUtil<StatisticsTotal> util = new ExcelUtil<StatisticsTotal>(StatisticsTotal.class);
|
|
||||||
util.exportExcel(response, list, "统计当日持仓数据");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取统计当日持仓详细信息
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:query')")
|
|
||||||
@GetMapping(value = "/{id}")
|
|
||||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
|
||||||
{
|
|
||||||
return AjaxResult.success(statisticsTotalService.selectStatisticsTotalById(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增统计当日持仓
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:add')")
|
|
||||||
@Log(title = "统计当日持仓", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
|
||||||
public AjaxResult add(@RequestBody StatisticsTotal statisticsTotal)
|
|
||||||
{
|
|
||||||
return toAjax(statisticsTotalService.insertStatisticsTotal(statisticsTotal));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改统计当日持仓
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:edit')")
|
|
||||||
@Log(title = "统计当日持仓", businessType = BusinessType.UPDATE)
|
|
||||||
@PutMapping
|
|
||||||
public AjaxResult edit(@RequestBody StatisticsTotal statisticsTotal)
|
|
||||||
{
|
|
||||||
return toAjax(statisticsTotalService.updateStatisticsTotal(statisticsTotal));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除统计当日持仓
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('booksystem:statistictotal:remove')")
|
|
||||||
@Log(title = "统计当日持仓", businessType = BusinessType.DELETE)
|
|
||||||
@DeleteMapping("/{ids}")
|
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
|
||||||
{
|
|
||||||
return toAjax(statisticsTotalService.deleteStatisticsTotalByIds(ids));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,153 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.domain;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 交易账户对象 account
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public class Account extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** $column.columnComment */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 交易日期 */
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
||||||
@Excel(name = "交易日期", width = 30, dateFormat = "yyyy-MM-dd")
|
|
||||||
private Date tradeDay;
|
|
||||||
|
|
||||||
/** 交易日星期 */
|
|
||||||
@Excel(name = "交易日星期")
|
|
||||||
private String weekDay;
|
|
||||||
|
|
||||||
/** 净资产 */
|
|
||||||
@Excel(name = "净资产")
|
|
||||||
private BigDecimal assets;
|
|
||||||
|
|
||||||
/** 总资产 */
|
|
||||||
@Excel(name = "总资产")
|
|
||||||
private BigDecimal totalAssets;
|
|
||||||
|
|
||||||
/** 当日盈亏 */
|
|
||||||
@Excel(name = "当日盈亏")
|
|
||||||
private BigDecimal profit;
|
|
||||||
|
|
||||||
/** 当日净资产盈亏比例 */
|
|
||||||
@Excel(name = "当日净资产盈亏比例")
|
|
||||||
private BigDecimal assetsDiff;
|
|
||||||
|
|
||||||
/** 当日总资产盈亏比例 */
|
|
||||||
@Excel(name = "当日总资产盈亏比例")
|
|
||||||
private BigDecimal totalDiff;
|
|
||||||
|
|
||||||
/** 用户id */
|
|
||||||
@Excel(name = "用户id")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setTradeDay(Date tradeDay)
|
|
||||||
{
|
|
||||||
this.tradeDay = tradeDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getTradeDay()
|
|
||||||
{
|
|
||||||
return tradeDay;
|
|
||||||
}
|
|
||||||
public void setWeekDay(String weekDay)
|
|
||||||
{
|
|
||||||
this.weekDay = weekDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWeekDay()
|
|
||||||
{
|
|
||||||
return weekDay;
|
|
||||||
}
|
|
||||||
public void setAssets(BigDecimal assets)
|
|
||||||
{
|
|
||||||
this.assets = assets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getAssets()
|
|
||||||
{
|
|
||||||
return assets;
|
|
||||||
}
|
|
||||||
public void setTotalAssets(BigDecimal totalAssets)
|
|
||||||
{
|
|
||||||
this.totalAssets = totalAssets;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getTotalAssets()
|
|
||||||
{
|
|
||||||
return totalAssets;
|
|
||||||
}
|
|
||||||
public void setProfit(BigDecimal profit)
|
|
||||||
{
|
|
||||||
this.profit = profit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getProfit()
|
|
||||||
{
|
|
||||||
return profit;
|
|
||||||
}
|
|
||||||
public void setAssetsDiff(BigDecimal assetsDiff)
|
|
||||||
{
|
|
||||||
this.assetsDiff = assetsDiff;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getAssetsDiff()
|
|
||||||
{
|
|
||||||
return assetsDiff;
|
|
||||||
}
|
|
||||||
public void setTotalDiff(BigDecimal totalDiff)
|
|
||||||
{
|
|
||||||
this.totalDiff = totalDiff;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getTotalDiff()
|
|
||||||
{
|
|
||||||
return totalDiff;
|
|
||||||
}
|
|
||||||
public void setUserId(Long userId)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUserId()
|
|
||||||
{
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("tradeDay", getTradeDay())
|
|
||||||
.append("weekDay", getWeekDay())
|
|
||||||
.append("assets", getAssets())
|
|
||||||
.append("totalAssets", getTotalAssets())
|
|
||||||
.append("profit", getProfit())
|
|
||||||
.append("assetsDiff", getAssetsDiff())
|
|
||||||
.append("totalDiff", getTotalDiff())
|
|
||||||
.append("userId", getUserId())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,265 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.domain;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当日操作对象 operations
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public class Operations extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** $column.columnComment */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 股票代码 */
|
|
||||||
@Excel(name = "股票代码")
|
|
||||||
private String code;
|
|
||||||
|
|
||||||
/** 股票名称 */
|
|
||||||
@Excel(name = "股票名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
/** 交易日期 */
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
||||||
@Excel(name = "交易日期", width = 30, dateFormat = "yyyy-MM-dd")
|
|
||||||
private Date tradeDay;
|
|
||||||
|
|
||||||
/** 交易日星期 */
|
|
||||||
@Excel(name = "交易日星期")
|
|
||||||
private String weekDay;
|
|
||||||
|
|
||||||
/** 操作(含账户转入转出) */
|
|
||||||
@Excel(name = "操作", readConverterExp = "含=账户转入转出")
|
|
||||||
private String operate;
|
|
||||||
|
|
||||||
/** 交易价格 */
|
|
||||||
@Excel(name = "交易价格")
|
|
||||||
private BigDecimal dealPrice;
|
|
||||||
|
|
||||||
/** 成交量 */
|
|
||||||
@Excel(name = "成交量")
|
|
||||||
private Long volumn;
|
|
||||||
|
|
||||||
/** 成交额 */
|
|
||||||
@Excel(name = "成交额")
|
|
||||||
private BigDecimal amount;
|
|
||||||
|
|
||||||
/** 印花税 */
|
|
||||||
@Excel(name = "印花税")
|
|
||||||
private BigDecimal tax;
|
|
||||||
|
|
||||||
/** 手续费 */
|
|
||||||
@Excel(name = "手续费")
|
|
||||||
private BigDecimal fee;
|
|
||||||
|
|
||||||
/** 其他费用 */
|
|
||||||
@Excel(name = "其他费用")
|
|
||||||
private BigDecimal other;
|
|
||||||
|
|
||||||
/** 操作时涨跌 */
|
|
||||||
@Excel(name = "操作时涨跌")
|
|
||||||
private BigDecimal operateDiff;
|
|
||||||
|
|
||||||
/** 关联操作id */
|
|
||||||
@Excel(name = "关联操作id")
|
|
||||||
private Long preId;
|
|
||||||
|
|
||||||
/** 用户id */
|
|
||||||
@Excel(name = "用户id")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/** 操作逻辑 */
|
|
||||||
@Excel(name = "操作逻辑")
|
|
||||||
private String dealLogic;
|
|
||||||
|
|
||||||
/** 备注 */
|
|
||||||
@Excel(name = "备注")
|
|
||||||
private String bz;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setCode(String code)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode()
|
|
||||||
{
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
public void setName(String name)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public void setTradeDay(Date tradeDay)
|
|
||||||
{
|
|
||||||
this.tradeDay = tradeDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getTradeDay()
|
|
||||||
{
|
|
||||||
return tradeDay;
|
|
||||||
}
|
|
||||||
public void setWeekDay(String weekDay)
|
|
||||||
{
|
|
||||||
this.weekDay = weekDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWeekDay()
|
|
||||||
{
|
|
||||||
return weekDay;
|
|
||||||
}
|
|
||||||
public void setOperate(String operate)
|
|
||||||
{
|
|
||||||
this.operate = operate;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOperate()
|
|
||||||
{
|
|
||||||
return operate;
|
|
||||||
}
|
|
||||||
public void setDealPrice(BigDecimal dealPrice)
|
|
||||||
{
|
|
||||||
this.dealPrice = dealPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getDealPrice()
|
|
||||||
{
|
|
||||||
return dealPrice;
|
|
||||||
}
|
|
||||||
public void setVolumn(Long volumn)
|
|
||||||
{
|
|
||||||
this.volumn = volumn;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getVolumn()
|
|
||||||
{
|
|
||||||
return volumn;
|
|
||||||
}
|
|
||||||
public void setAmount(BigDecimal amount)
|
|
||||||
{
|
|
||||||
this.amount = amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getAmount()
|
|
||||||
{
|
|
||||||
return amount;
|
|
||||||
}
|
|
||||||
public void setTax(BigDecimal tax)
|
|
||||||
{
|
|
||||||
this.tax = tax;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getTax()
|
|
||||||
{
|
|
||||||
return tax;
|
|
||||||
}
|
|
||||||
public void setFee(BigDecimal fee)
|
|
||||||
{
|
|
||||||
this.fee = fee;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getFee()
|
|
||||||
{
|
|
||||||
return fee;
|
|
||||||
}
|
|
||||||
public void setOther(BigDecimal other)
|
|
||||||
{
|
|
||||||
this.other = other;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getOther()
|
|
||||||
{
|
|
||||||
return other;
|
|
||||||
}
|
|
||||||
public void setOperateDiff(BigDecimal operateDiff)
|
|
||||||
{
|
|
||||||
this.operateDiff = operateDiff;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getOperateDiff()
|
|
||||||
{
|
|
||||||
return operateDiff;
|
|
||||||
}
|
|
||||||
public void setPreId(Long preId)
|
|
||||||
{
|
|
||||||
this.preId = preId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getPreId()
|
|
||||||
{
|
|
||||||
return preId;
|
|
||||||
}
|
|
||||||
public void setUserId(Long userId)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUserId()
|
|
||||||
{
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
public void setDealLogic(String dealLogic)
|
|
||||||
{
|
|
||||||
this.dealLogic = dealLogic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDealLogic()
|
|
||||||
{
|
|
||||||
return dealLogic;
|
|
||||||
}
|
|
||||||
public void setBz(String bz)
|
|
||||||
{
|
|
||||||
this.bz = bz;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBz()
|
|
||||||
{
|
|
||||||
return bz;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("code", getCode())
|
|
||||||
.append("name", getName())
|
|
||||||
.append("tradeDay", getTradeDay())
|
|
||||||
.append("weekDay", getWeekDay())
|
|
||||||
.append("operate", getOperate())
|
|
||||||
.append("dealPrice", getDealPrice())
|
|
||||||
.append("volumn", getVolumn())
|
|
||||||
.append("amount", getAmount())
|
|
||||||
.append("tax", getTax())
|
|
||||||
.append("fee", getFee())
|
|
||||||
.append("other", getOther())
|
|
||||||
.append("operateDiff", getOperateDiff())
|
|
||||||
.append("preId", getPreId())
|
|
||||||
.append("userId", getUserId())
|
|
||||||
.append("dealLogic", getDealLogic())
|
|
||||||
.append("bz", getBz())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,181 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.domain;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 单笔操作统计对象 statistics
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public class Statistics extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** $column.columnComment */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 股票代码 */
|
|
||||||
@Excel(name = "股票代码")
|
|
||||||
private String code;
|
|
||||||
|
|
||||||
/** 股票名称 */
|
|
||||||
@Excel(name = "股票名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
/** 交易日期 */
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
||||||
@Excel(name = "交易日期", width = 30, dateFormat = "yyyy-MM-dd")
|
|
||||||
private Date tradeDay;
|
|
||||||
|
|
||||||
/** 交易日星期 */
|
|
||||||
@Excel(name = "交易日星期")
|
|
||||||
private String weekDay;
|
|
||||||
|
|
||||||
/** 操作id */
|
|
||||||
@Excel(name = "操作id")
|
|
||||||
private String operationsId;
|
|
||||||
|
|
||||||
/** 当笔当日盈亏 */
|
|
||||||
@Excel(name = "当笔当日盈亏")
|
|
||||||
private BigDecimal profit;
|
|
||||||
|
|
||||||
/** 当笔当日盈亏盈亏比例 */
|
|
||||||
@Excel(name = "当笔当日盈亏盈亏比例")
|
|
||||||
private Long diff;
|
|
||||||
|
|
||||||
/** 操作id */
|
|
||||||
@Excel(name = "操作id")
|
|
||||||
private Long operateionId;
|
|
||||||
|
|
||||||
/** 用户id */
|
|
||||||
@Excel(name = "用户id")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/** 备注 */
|
|
||||||
@Excel(name = "备注")
|
|
||||||
private String bz;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setCode(String code)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode()
|
|
||||||
{
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
public void setName(String name)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public void setTradeDay(Date tradeDay)
|
|
||||||
{
|
|
||||||
this.tradeDay = tradeDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getTradeDay()
|
|
||||||
{
|
|
||||||
return tradeDay;
|
|
||||||
}
|
|
||||||
public void setWeekDay(String weekDay)
|
|
||||||
{
|
|
||||||
this.weekDay = weekDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWeekDay()
|
|
||||||
{
|
|
||||||
return weekDay;
|
|
||||||
}
|
|
||||||
public void setOperationsId(String operationsId)
|
|
||||||
{
|
|
||||||
this.operationsId = operationsId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getOperationsId()
|
|
||||||
{
|
|
||||||
return operationsId;
|
|
||||||
}
|
|
||||||
public void setProfit(BigDecimal profit)
|
|
||||||
{
|
|
||||||
this.profit = profit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getProfit()
|
|
||||||
{
|
|
||||||
return profit;
|
|
||||||
}
|
|
||||||
public void setDiff(Long diff)
|
|
||||||
{
|
|
||||||
this.diff = diff;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getDiff()
|
|
||||||
{
|
|
||||||
return diff;
|
|
||||||
}
|
|
||||||
public void setOperateionId(Long operateionId)
|
|
||||||
{
|
|
||||||
this.operateionId = operateionId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getOperateionId()
|
|
||||||
{
|
|
||||||
return operateionId;
|
|
||||||
}
|
|
||||||
public void setUserId(Long userId)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUserId()
|
|
||||||
{
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
public void setBz(String bz)
|
|
||||||
{
|
|
||||||
this.bz = bz;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBz()
|
|
||||||
{
|
|
||||||
return bz;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("code", getCode())
|
|
||||||
.append("name", getName())
|
|
||||||
.append("tradeDay", getTradeDay())
|
|
||||||
.append("weekDay", getWeekDay())
|
|
||||||
.append("operationsId", getOperationsId())
|
|
||||||
.append("profit", getProfit())
|
|
||||||
.append("diff", getDiff())
|
|
||||||
.append("operateionId", getOperateionId())
|
|
||||||
.append("userId", getUserId())
|
|
||||||
.append("bz", getBz())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,181 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.domain;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当日持仓统计对象 statistics_remain
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public class StatisticsRemain extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** $column.columnComment */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 股票代码 */
|
|
||||||
@Excel(name = "股票代码")
|
|
||||||
private String code;
|
|
||||||
|
|
||||||
/** 股票名称 */
|
|
||||||
@Excel(name = "股票名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
/** 交易日期 */
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
||||||
@Excel(name = "交易日期", width = 30, dateFormat = "yyyy-MM-dd")
|
|
||||||
private Date tradeDay;
|
|
||||||
|
|
||||||
/** 交易日星期 */
|
|
||||||
@Excel(name = "交易日星期")
|
|
||||||
private String weekDay;
|
|
||||||
|
|
||||||
/** 总盈亏 */
|
|
||||||
@Excel(name = "总盈亏")
|
|
||||||
private BigDecimal totalProfit;
|
|
||||||
|
|
||||||
/** 总盈亏比例 */
|
|
||||||
@Excel(name = "总盈亏比例")
|
|
||||||
private BigDecimal totalDiff;
|
|
||||||
|
|
||||||
/** 总盈亏占整体盈亏比例 */
|
|
||||||
@Excel(name = "总盈亏占整体盈亏比例")
|
|
||||||
private BigDecimal totalDiffOverall;
|
|
||||||
|
|
||||||
/** 剩余数量 */
|
|
||||||
@Excel(name = "剩余数量")
|
|
||||||
private BigDecimal remaining;
|
|
||||||
|
|
||||||
/** 用户id */
|
|
||||||
@Excel(name = "用户id")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/** 备注 */
|
|
||||||
@Excel(name = "备注")
|
|
||||||
private String bz;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setCode(String code)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode()
|
|
||||||
{
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
public void setName(String name)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public void setTradeDay(Date tradeDay)
|
|
||||||
{
|
|
||||||
this.tradeDay = tradeDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getTradeDay()
|
|
||||||
{
|
|
||||||
return tradeDay;
|
|
||||||
}
|
|
||||||
public void setWeekDay(String weekDay)
|
|
||||||
{
|
|
||||||
this.weekDay = weekDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getWeekDay()
|
|
||||||
{
|
|
||||||
return weekDay;
|
|
||||||
}
|
|
||||||
public void setTotalProfit(BigDecimal totalProfit)
|
|
||||||
{
|
|
||||||
this.totalProfit = totalProfit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getTotalProfit()
|
|
||||||
{
|
|
||||||
return totalProfit;
|
|
||||||
}
|
|
||||||
public void setTotalDiff(BigDecimal totalDiff)
|
|
||||||
{
|
|
||||||
this.totalDiff = totalDiff;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getTotalDiff()
|
|
||||||
{
|
|
||||||
return totalDiff;
|
|
||||||
}
|
|
||||||
public void setTotalDiffOverall(BigDecimal totalDiffOverall)
|
|
||||||
{
|
|
||||||
this.totalDiffOverall = totalDiffOverall;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getTotalDiffOverall()
|
|
||||||
{
|
|
||||||
return totalDiffOverall;
|
|
||||||
}
|
|
||||||
public void setRemaining(BigDecimal remaining)
|
|
||||||
{
|
|
||||||
this.remaining = remaining;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getRemaining()
|
|
||||||
{
|
|
||||||
return remaining;
|
|
||||||
}
|
|
||||||
public void setUserId(Long userId)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUserId()
|
|
||||||
{
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
public void setBz(String bz)
|
|
||||||
{
|
|
||||||
this.bz = bz;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBz()
|
|
||||||
{
|
|
||||||
return bz;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("code", getCode())
|
|
||||||
.append("name", getName())
|
|
||||||
.append("tradeDay", getTradeDay())
|
|
||||||
.append("weekDay", getWeekDay())
|
|
||||||
.append("totalProfit", getTotalProfit())
|
|
||||||
.append("totalDiff", getTotalDiff())
|
|
||||||
.append("totalDiffOverall", getTotalDiffOverall())
|
|
||||||
.append("remaining", getRemaining())
|
|
||||||
.append("userId", getUserId())
|
|
||||||
.append("bz", getBz())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,266 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.domain;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
|
||||||
import com.ruoyi.common.annotation.Excel;
|
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计当日持仓对象 statistics_total
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public class StatisticsTotal extends BaseEntity
|
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** $column.columnComment */
|
|
||||||
private Long id;
|
|
||||||
|
|
||||||
/** 股票代码 */
|
|
||||||
@Excel(name = "股票代码")
|
|
||||||
private String code;
|
|
||||||
|
|
||||||
/** 股票名称 */
|
|
||||||
@Excel(name = "股票名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
/** 建仓交易日期 */
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
||||||
@Excel(name = "建仓交易日期", width = 30, dateFormat = "yyyy-MM-dd")
|
|
||||||
private Date startTradeDay;
|
|
||||||
|
|
||||||
/** 清仓交易日星期 */
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
|
||||||
@Excel(name = "清仓交易日星期", width = 30, dateFormat = "yyyy-MM-dd")
|
|
||||||
private Date endTradeDay;
|
|
||||||
|
|
||||||
/** 总盈亏 */
|
|
||||||
@Excel(name = "总盈亏")
|
|
||||||
private BigDecimal totalProfit;
|
|
||||||
|
|
||||||
/** 总盈亏比例 */
|
|
||||||
@Excel(name = "总盈亏比例")
|
|
||||||
private BigDecimal totalDiff;
|
|
||||||
|
|
||||||
/** 建仓交易价格 */
|
|
||||||
@Excel(name = "建仓交易价格")
|
|
||||||
private BigDecimal startPrice;
|
|
||||||
|
|
||||||
/** 建仓交易价格 */
|
|
||||||
@Excel(name = "建仓交易价格")
|
|
||||||
private BigDecimal endPrice;
|
|
||||||
|
|
||||||
/** 总成交量 */
|
|
||||||
@Excel(name = "总成交量")
|
|
||||||
private Long volumnTotal;
|
|
||||||
|
|
||||||
/** 总成交额 */
|
|
||||||
@Excel(name = "总成交额")
|
|
||||||
private BigDecimal amountTotal;
|
|
||||||
|
|
||||||
/** 交易次数 */
|
|
||||||
@Excel(name = "交易次数")
|
|
||||||
private BigDecimal operateTimes;
|
|
||||||
|
|
||||||
/** 总手续费 */
|
|
||||||
@Excel(name = "总手续费")
|
|
||||||
private BigDecimal fee;
|
|
||||||
|
|
||||||
/** 总印花税 */
|
|
||||||
@Excel(name = "总印花税")
|
|
||||||
private BigDecimal tax;
|
|
||||||
|
|
||||||
/** 总其他费用 */
|
|
||||||
@Excel(name = "总其他费用")
|
|
||||||
private BigDecimal other;
|
|
||||||
|
|
||||||
/** 用户id */
|
|
||||||
@Excel(name = "用户id")
|
|
||||||
private Long userId;
|
|
||||||
|
|
||||||
/** 备注 */
|
|
||||||
@Excel(name = "备注")
|
|
||||||
private String bz;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
|
||||||
{
|
|
||||||
this.id = id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getId()
|
|
||||||
{
|
|
||||||
return id;
|
|
||||||
}
|
|
||||||
public void setCode(String code)
|
|
||||||
{
|
|
||||||
this.code = code;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCode()
|
|
||||||
{
|
|
||||||
return code;
|
|
||||||
}
|
|
||||||
public void setName(String name)
|
|
||||||
{
|
|
||||||
this.name = name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
public void setStartTradeDay(Date startTradeDay)
|
|
||||||
{
|
|
||||||
this.startTradeDay = startTradeDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getStartTradeDay()
|
|
||||||
{
|
|
||||||
return startTradeDay;
|
|
||||||
}
|
|
||||||
public void setEndTradeDay(Date endTradeDay)
|
|
||||||
{
|
|
||||||
this.endTradeDay = endTradeDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Date getEndTradeDay()
|
|
||||||
{
|
|
||||||
return endTradeDay;
|
|
||||||
}
|
|
||||||
public void setTotalProfit(BigDecimal totalProfit)
|
|
||||||
{
|
|
||||||
this.totalProfit = totalProfit;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getTotalProfit()
|
|
||||||
{
|
|
||||||
return totalProfit;
|
|
||||||
}
|
|
||||||
public void setTotalDiff(BigDecimal totalDiff)
|
|
||||||
{
|
|
||||||
this.totalDiff = totalDiff;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getTotalDiff()
|
|
||||||
{
|
|
||||||
return totalDiff;
|
|
||||||
}
|
|
||||||
public void setStartPrice(BigDecimal startPrice)
|
|
||||||
{
|
|
||||||
this.startPrice = startPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getStartPrice()
|
|
||||||
{
|
|
||||||
return startPrice;
|
|
||||||
}
|
|
||||||
public void setEndPrice(BigDecimal endPrice)
|
|
||||||
{
|
|
||||||
this.endPrice = endPrice;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getEndPrice()
|
|
||||||
{
|
|
||||||
return endPrice;
|
|
||||||
}
|
|
||||||
public void setVolumnTotal(Long volumnTotal)
|
|
||||||
{
|
|
||||||
this.volumnTotal = volumnTotal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getVolumnTotal()
|
|
||||||
{
|
|
||||||
return volumnTotal;
|
|
||||||
}
|
|
||||||
public void setAmountTotal(BigDecimal amountTotal)
|
|
||||||
{
|
|
||||||
this.amountTotal = amountTotal;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getAmountTotal()
|
|
||||||
{
|
|
||||||
return amountTotal;
|
|
||||||
}
|
|
||||||
public void setOperateTimes(BigDecimal operateTimes)
|
|
||||||
{
|
|
||||||
this.operateTimes = operateTimes;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getOperateTimes()
|
|
||||||
{
|
|
||||||
return operateTimes;
|
|
||||||
}
|
|
||||||
public void setFee(BigDecimal fee)
|
|
||||||
{
|
|
||||||
this.fee = fee;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getFee()
|
|
||||||
{
|
|
||||||
return fee;
|
|
||||||
}
|
|
||||||
public void setTax(BigDecimal tax)
|
|
||||||
{
|
|
||||||
this.tax = tax;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getTax()
|
|
||||||
{
|
|
||||||
return tax;
|
|
||||||
}
|
|
||||||
public void setOther(BigDecimal other)
|
|
||||||
{
|
|
||||||
this.other = other;
|
|
||||||
}
|
|
||||||
|
|
||||||
public BigDecimal getOther()
|
|
||||||
{
|
|
||||||
return other;
|
|
||||||
}
|
|
||||||
public void setUserId(Long userId)
|
|
||||||
{
|
|
||||||
this.userId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getUserId()
|
|
||||||
{
|
|
||||||
return userId;
|
|
||||||
}
|
|
||||||
public void setBz(String bz)
|
|
||||||
{
|
|
||||||
this.bz = bz;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getBz()
|
|
||||||
{
|
|
||||||
return bz;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String toString() {
|
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
|
||||||
.append("id", getId())
|
|
||||||
.append("code", getCode())
|
|
||||||
.append("name", getName())
|
|
||||||
.append("startTradeDay", getStartTradeDay())
|
|
||||||
.append("endTradeDay", getEndTradeDay())
|
|
||||||
.append("totalProfit", getTotalProfit())
|
|
||||||
.append("totalDiff", getTotalDiff())
|
|
||||||
.append("startPrice", getStartPrice())
|
|
||||||
.append("endPrice", getEndPrice())
|
|
||||||
.append("volumnTotal", getVolumnTotal())
|
|
||||||
.append("amountTotal", getAmountTotal())
|
|
||||||
.append("operateTimes", getOperateTimes())
|
|
||||||
.append("fee", getFee())
|
|
||||||
.append("tax", getTax())
|
|
||||||
.append("other", getOther())
|
|
||||||
.append("userId", getUserId())
|
|
||||||
.append("bz", getBz())
|
|
||||||
.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.booksystem.domain.Account;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 交易账户Mapper接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public interface AccountMapper
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询交易账户
|
|
||||||
*
|
|
||||||
* @param id 交易账户主键
|
|
||||||
* @return 交易账户
|
|
||||||
*/
|
|
||||||
public Account selectAccountById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询交易账户列表
|
|
||||||
*
|
|
||||||
* @param account 交易账户
|
|
||||||
* @return 交易账户集合
|
|
||||||
*/
|
|
||||||
public List<Account> selectAccountList(Account account);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增交易账户
|
|
||||||
*
|
|
||||||
* @param account 交易账户
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertAccount(Account account);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改交易账户
|
|
||||||
*
|
|
||||||
* @param account 交易账户
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateAccount(Account account);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除交易账户
|
|
||||||
*
|
|
||||||
* @param id 交易账户主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteAccountById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除交易账户
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteAccountByIds(Long[] ids);
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.booksystem.domain.Operations;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当日操作Mapper接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public interface OperationsMapper
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询当日操作
|
|
||||||
*
|
|
||||||
* @param id 当日操作主键
|
|
||||||
* @return 当日操作
|
|
||||||
*/
|
|
||||||
public Operations selectOperationsById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当日操作列表
|
|
||||||
*
|
|
||||||
* @param operations 当日操作
|
|
||||||
* @return 当日操作集合
|
|
||||||
*/
|
|
||||||
public List<Operations> selectOperationsList(Operations operations);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增当日操作
|
|
||||||
*
|
|
||||||
* @param operations 当日操作
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertOperations(Operations operations);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改当日操作
|
|
||||||
*
|
|
||||||
* @param operations 当日操作
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateOperations(Operations operations);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除当日操作
|
|
||||||
*
|
|
||||||
* @param id 当日操作主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteOperationsById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除当日操作
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteOperationsByIds(Long[] ids);
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.booksystem.domain.Statistics;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 单笔操作统计Mapper接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public interface StatisticsMapper
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询单笔操作统计
|
|
||||||
*
|
|
||||||
* @param id 单笔操作统计主键
|
|
||||||
* @return 单笔操作统计
|
|
||||||
*/
|
|
||||||
public Statistics selectStatisticsById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询单笔操作统计列表
|
|
||||||
*
|
|
||||||
* @param statistics 单笔操作统计
|
|
||||||
* @return 单笔操作统计集合
|
|
||||||
*/
|
|
||||||
public List<Statistics> selectStatisticsList(Statistics statistics);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增单笔操作统计
|
|
||||||
*
|
|
||||||
* @param statistics 单笔操作统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertStatistics(Statistics statistics);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改单笔操作统计
|
|
||||||
*
|
|
||||||
* @param statistics 单笔操作统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateStatistics(Statistics statistics);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除单笔操作统计
|
|
||||||
*
|
|
||||||
* @param id 单笔操作统计主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除单笔操作统计
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsByIds(Long[] ids);
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.booksystem.domain.StatisticsRemain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当日持仓统计Mapper接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public interface StatisticsRemainMapper
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询当日持仓统计
|
|
||||||
*
|
|
||||||
* @param id 当日持仓统计主键
|
|
||||||
* @return 当日持仓统计
|
|
||||||
*/
|
|
||||||
public StatisticsRemain selectStatisticsRemainById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当日持仓统计列表
|
|
||||||
*
|
|
||||||
* @param statisticsRemain 当日持仓统计
|
|
||||||
* @return 当日持仓统计集合
|
|
||||||
*/
|
|
||||||
public List<StatisticsRemain> selectStatisticsRemainList(StatisticsRemain statisticsRemain);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增当日持仓统计
|
|
||||||
*
|
|
||||||
* @param statisticsRemain 当日持仓统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertStatisticsRemain(StatisticsRemain statisticsRemain);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改当日持仓统计
|
|
||||||
*
|
|
||||||
* @param statisticsRemain 当日持仓统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateStatisticsRemain(StatisticsRemain statisticsRemain);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除当日持仓统计
|
|
||||||
*
|
|
||||||
* @param id 当日持仓统计主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsRemainById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除当日持仓统计
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsRemainByIds(Long[] ids);
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.mapper;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.booksystem.domain.StatisticsTotal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计当日持仓Mapper接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public interface StatisticsTotalMapper
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询统计当日持仓
|
|
||||||
*
|
|
||||||
* @param id 统计当日持仓主键
|
|
||||||
* @return 统计当日持仓
|
|
||||||
*/
|
|
||||||
public StatisticsTotal selectStatisticsTotalById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询统计当日持仓列表
|
|
||||||
*
|
|
||||||
* @param statisticsTotal 统计当日持仓
|
|
||||||
* @return 统计当日持仓集合
|
|
||||||
*/
|
|
||||||
public List<StatisticsTotal> selectStatisticsTotalList(StatisticsTotal statisticsTotal);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增统计当日持仓
|
|
||||||
*
|
|
||||||
* @param statisticsTotal 统计当日持仓
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertStatisticsTotal(StatisticsTotal statisticsTotal);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改统计当日持仓
|
|
||||||
*
|
|
||||||
* @param statisticsTotal 统计当日持仓
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateStatisticsTotal(StatisticsTotal statisticsTotal);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除统计当日持仓
|
|
||||||
*
|
|
||||||
* @param id 统计当日持仓主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsTotalById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除统计当日持仓
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的数据主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsTotalByIds(Long[] ids);
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.booksystem.domain.Account;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 交易账户Service接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public interface IAccountService
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询交易账户
|
|
||||||
*
|
|
||||||
* @param id 交易账户主键
|
|
||||||
* @return 交易账户
|
|
||||||
*/
|
|
||||||
public Account selectAccountById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询交易账户列表
|
|
||||||
*
|
|
||||||
* @param account 交易账户
|
|
||||||
* @return 交易账户集合
|
|
||||||
*/
|
|
||||||
public List<Account> selectAccountList(Account account);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增交易账户
|
|
||||||
*
|
|
||||||
* @param account 交易账户
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertAccount(Account account);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改交易账户
|
|
||||||
*
|
|
||||||
* @param account 交易账户
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateAccount(Account account);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除交易账户
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的交易账户主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteAccountByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除交易账户信息
|
|
||||||
*
|
|
||||||
* @param id 交易账户主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteAccountById(Long id);
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.booksystem.domain.Operations;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当日操作Service接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public interface IOperationsService
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询当日操作
|
|
||||||
*
|
|
||||||
* @param id 当日操作主键
|
|
||||||
* @return 当日操作
|
|
||||||
*/
|
|
||||||
public Operations selectOperationsById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当日操作列表
|
|
||||||
*
|
|
||||||
* @param operations 当日操作
|
|
||||||
* @return 当日操作集合
|
|
||||||
*/
|
|
||||||
public List<Operations> selectOperationsList(Operations operations);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增当日操作
|
|
||||||
*
|
|
||||||
* @param operations 当日操作
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertOperations(Operations operations);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改当日操作
|
|
||||||
*
|
|
||||||
* @param operations 当日操作
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateOperations(Operations operations);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除当日操作
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的当日操作主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteOperationsByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除当日操作信息
|
|
||||||
*
|
|
||||||
* @param id 当日操作主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteOperationsById(Long id);
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.booksystem.domain.StatisticsRemain;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当日持仓统计Service接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public interface IStatisticsRemainService
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询当日持仓统计
|
|
||||||
*
|
|
||||||
* @param id 当日持仓统计主键
|
|
||||||
* @return 当日持仓统计
|
|
||||||
*/
|
|
||||||
public StatisticsRemain selectStatisticsRemainById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当日持仓统计列表
|
|
||||||
*
|
|
||||||
* @param statisticsRemain 当日持仓统计
|
|
||||||
* @return 当日持仓统计集合
|
|
||||||
*/
|
|
||||||
public List<StatisticsRemain> selectStatisticsRemainList(StatisticsRemain statisticsRemain);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增当日持仓统计
|
|
||||||
*
|
|
||||||
* @param statisticsRemain 当日持仓统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertStatisticsRemain(StatisticsRemain statisticsRemain);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改当日持仓统计
|
|
||||||
*
|
|
||||||
* @param statisticsRemain 当日持仓统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateStatisticsRemain(StatisticsRemain statisticsRemain);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除当日持仓统计
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的当日持仓统计主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsRemainByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除当日持仓统计信息
|
|
||||||
*
|
|
||||||
* @param id 当日持仓统计主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsRemainById(Long id);
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.booksystem.domain.Statistics;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 单笔操作统计Service接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public interface IStatisticsService
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询单笔操作统计
|
|
||||||
*
|
|
||||||
* @param id 单笔操作统计主键
|
|
||||||
* @return 单笔操作统计
|
|
||||||
*/
|
|
||||||
public Statistics selectStatisticsById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询单笔操作统计列表
|
|
||||||
*
|
|
||||||
* @param statistics 单笔操作统计
|
|
||||||
* @return 单笔操作统计集合
|
|
||||||
*/
|
|
||||||
public List<Statistics> selectStatisticsList(Statistics statistics);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增单笔操作统计
|
|
||||||
*
|
|
||||||
* @param statistics 单笔操作统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertStatistics(Statistics statistics);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改单笔操作统计
|
|
||||||
*
|
|
||||||
* @param statistics 单笔操作统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateStatistics(Statistics statistics);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除单笔操作统计
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的单笔操作统计主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除单笔操作统计信息
|
|
||||||
*
|
|
||||||
* @param id 单笔操作统计主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsById(Long id);
|
|
||||||
}
|
|
||||||
@ -1,61 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.booksystem.domain.StatisticsTotal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计当日持仓Service接口
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
public interface IStatisticsTotalService
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* 查询统计当日持仓
|
|
||||||
*
|
|
||||||
* @param id 统计当日持仓主键
|
|
||||||
* @return 统计当日持仓
|
|
||||||
*/
|
|
||||||
public StatisticsTotal selectStatisticsTotalById(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询统计当日持仓列表
|
|
||||||
*
|
|
||||||
* @param statisticsTotal 统计当日持仓
|
|
||||||
* @return 统计当日持仓集合
|
|
||||||
*/
|
|
||||||
public List<StatisticsTotal> selectStatisticsTotalList(StatisticsTotal statisticsTotal);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增统计当日持仓
|
|
||||||
*
|
|
||||||
* @param statisticsTotal 统计当日持仓
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int insertStatisticsTotal(StatisticsTotal statisticsTotal);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改统计当日持仓
|
|
||||||
*
|
|
||||||
* @param statisticsTotal 统计当日持仓
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int updateStatisticsTotal(StatisticsTotal statisticsTotal);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除统计当日持仓
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的统计当日持仓主键集合
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsTotalByIds(Long[] ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除统计当日持仓信息
|
|
||||||
*
|
|
||||||
* @param id 统计当日持仓主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
public int deleteStatisticsTotalById(Long id);
|
|
||||||
}
|
|
||||||
@ -1,93 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.service.impl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.ruoyi.booksystem.mapper.AccountMapper;
|
|
||||||
import com.ruoyi.booksystem.domain.Account;
|
|
||||||
import com.ruoyi.booksystem.service.IAccountService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 交易账户Service业务层处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class AccountServiceImpl implements IAccountService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private AccountMapper accountMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询交易账户
|
|
||||||
*
|
|
||||||
* @param id 交易账户主键
|
|
||||||
* @return 交易账户
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Account selectAccountById(Long id)
|
|
||||||
{
|
|
||||||
return accountMapper.selectAccountById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询交易账户列表
|
|
||||||
*
|
|
||||||
* @param account 交易账户
|
|
||||||
* @return 交易账户
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Account> selectAccountList(Account account)
|
|
||||||
{
|
|
||||||
return accountMapper.selectAccountList(account);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增交易账户
|
|
||||||
*
|
|
||||||
* @param account 交易账户
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertAccount(Account account)
|
|
||||||
{
|
|
||||||
return accountMapper.insertAccount(account);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改交易账户
|
|
||||||
*
|
|
||||||
* @param account 交易账户
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateAccount(Account account)
|
|
||||||
{
|
|
||||||
return accountMapper.updateAccount(account);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除交易账户
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的交易账户主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteAccountByIds(Long[] ids)
|
|
||||||
{
|
|
||||||
return accountMapper.deleteAccountByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除交易账户信息
|
|
||||||
*
|
|
||||||
* @param id 交易账户主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteAccountById(Long id)
|
|
||||||
{
|
|
||||||
return accountMapper.deleteAccountById(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,93 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.service.impl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.ruoyi.booksystem.mapper.OperationsMapper;
|
|
||||||
import com.ruoyi.booksystem.domain.Operations;
|
|
||||||
import com.ruoyi.booksystem.service.IOperationsService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当日操作Service业务层处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class OperationsServiceImpl implements IOperationsService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private OperationsMapper operationsMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当日操作
|
|
||||||
*
|
|
||||||
* @param id 当日操作主键
|
|
||||||
* @return 当日操作
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Operations selectOperationsById(Long id)
|
|
||||||
{
|
|
||||||
return operationsMapper.selectOperationsById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当日操作列表
|
|
||||||
*
|
|
||||||
* @param operations 当日操作
|
|
||||||
* @return 当日操作
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Operations> selectOperationsList(Operations operations)
|
|
||||||
{
|
|
||||||
return operationsMapper.selectOperationsList(operations);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增当日操作
|
|
||||||
*
|
|
||||||
* @param operations 当日操作
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertOperations(Operations operations)
|
|
||||||
{
|
|
||||||
return operationsMapper.insertOperations(operations);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改当日操作
|
|
||||||
*
|
|
||||||
* @param operations 当日操作
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateOperations(Operations operations)
|
|
||||||
{
|
|
||||||
return operationsMapper.updateOperations(operations);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除当日操作
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的当日操作主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteOperationsByIds(Long[] ids)
|
|
||||||
{
|
|
||||||
return operationsMapper.deleteOperationsByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除当日操作信息
|
|
||||||
*
|
|
||||||
* @param id 当日操作主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteOperationsById(Long id)
|
|
||||||
{
|
|
||||||
return operationsMapper.deleteOperationsById(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,93 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.service.impl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.ruoyi.booksystem.mapper.StatisticsRemainMapper;
|
|
||||||
import com.ruoyi.booksystem.domain.StatisticsRemain;
|
|
||||||
import com.ruoyi.booksystem.service.IStatisticsRemainService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 当日持仓统计Service业务层处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class StatisticsRemainServiceImpl implements IStatisticsRemainService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private StatisticsRemainMapper statisticsRemainMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当日持仓统计
|
|
||||||
*
|
|
||||||
* @param id 当日持仓统计主键
|
|
||||||
* @return 当日持仓统计
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public StatisticsRemain selectStatisticsRemainById(Long id)
|
|
||||||
{
|
|
||||||
return statisticsRemainMapper.selectStatisticsRemainById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询当日持仓统计列表
|
|
||||||
*
|
|
||||||
* @param statisticsRemain 当日持仓统计
|
|
||||||
* @return 当日持仓统计
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<StatisticsRemain> selectStatisticsRemainList(StatisticsRemain statisticsRemain)
|
|
||||||
{
|
|
||||||
return statisticsRemainMapper.selectStatisticsRemainList(statisticsRemain);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增当日持仓统计
|
|
||||||
*
|
|
||||||
* @param statisticsRemain 当日持仓统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertStatisticsRemain(StatisticsRemain statisticsRemain)
|
|
||||||
{
|
|
||||||
return statisticsRemainMapper.insertStatisticsRemain(statisticsRemain);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改当日持仓统计
|
|
||||||
*
|
|
||||||
* @param statisticsRemain 当日持仓统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateStatisticsRemain(StatisticsRemain statisticsRemain)
|
|
||||||
{
|
|
||||||
return statisticsRemainMapper.updateStatisticsRemain(statisticsRemain);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除当日持仓统计
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的当日持仓统计主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteStatisticsRemainByIds(Long[] ids)
|
|
||||||
{
|
|
||||||
return statisticsRemainMapper.deleteStatisticsRemainByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除当日持仓统计信息
|
|
||||||
*
|
|
||||||
* @param id 当日持仓统计主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteStatisticsRemainById(Long id)
|
|
||||||
{
|
|
||||||
return statisticsRemainMapper.deleteStatisticsRemainById(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,93 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.service.impl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.ruoyi.booksystem.mapper.StatisticsMapper;
|
|
||||||
import com.ruoyi.booksystem.domain.Statistics;
|
|
||||||
import com.ruoyi.booksystem.service.IStatisticsService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 单笔操作统计Service业务层处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class StatisticsServiceImpl implements IStatisticsService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private StatisticsMapper statisticsMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询单笔操作统计
|
|
||||||
*
|
|
||||||
* @param id 单笔操作统计主键
|
|
||||||
* @return 单笔操作统计
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public Statistics selectStatisticsById(Long id)
|
|
||||||
{
|
|
||||||
return statisticsMapper.selectStatisticsById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询单笔操作统计列表
|
|
||||||
*
|
|
||||||
* @param statistics 单笔操作统计
|
|
||||||
* @return 单笔操作统计
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<Statistics> selectStatisticsList(Statistics statistics)
|
|
||||||
{
|
|
||||||
return statisticsMapper.selectStatisticsList(statistics);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增单笔操作统计
|
|
||||||
*
|
|
||||||
* @param statistics 单笔操作统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertStatistics(Statistics statistics)
|
|
||||||
{
|
|
||||||
return statisticsMapper.insertStatistics(statistics);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改单笔操作统计
|
|
||||||
*
|
|
||||||
* @param statistics 单笔操作统计
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateStatistics(Statistics statistics)
|
|
||||||
{
|
|
||||||
return statisticsMapper.updateStatistics(statistics);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除单笔操作统计
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的单笔操作统计主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteStatisticsByIds(Long[] ids)
|
|
||||||
{
|
|
||||||
return statisticsMapper.deleteStatisticsByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除单笔操作统计信息
|
|
||||||
*
|
|
||||||
* @param id 单笔操作统计主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteStatisticsById(Long id)
|
|
||||||
{
|
|
||||||
return statisticsMapper.deleteStatisticsById(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,93 +0,0 @@
|
|||||||
package com.ruoyi.booksystem.service.impl;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.ruoyi.booksystem.mapper.StatisticsTotalMapper;
|
|
||||||
import com.ruoyi.booksystem.domain.StatisticsTotal;
|
|
||||||
import com.ruoyi.booksystem.service.IStatisticsTotalService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 统计当日持仓Service业务层处理
|
|
||||||
*
|
|
||||||
* @author ruoyi
|
|
||||||
* @date 2023-12-18
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class StatisticsTotalServiceImpl implements IStatisticsTotalService
|
|
||||||
{
|
|
||||||
@Autowired
|
|
||||||
private StatisticsTotalMapper statisticsTotalMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询统计当日持仓
|
|
||||||
*
|
|
||||||
* @param id 统计当日持仓主键
|
|
||||||
* @return 统计当日持仓
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public StatisticsTotal selectStatisticsTotalById(Long id)
|
|
||||||
{
|
|
||||||
return statisticsTotalMapper.selectStatisticsTotalById(id);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询统计当日持仓列表
|
|
||||||
*
|
|
||||||
* @param statisticsTotal 统计当日持仓
|
|
||||||
* @return 统计当日持仓
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public List<StatisticsTotal> selectStatisticsTotalList(StatisticsTotal statisticsTotal)
|
|
||||||
{
|
|
||||||
return statisticsTotalMapper.selectStatisticsTotalList(statisticsTotal);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增统计当日持仓
|
|
||||||
*
|
|
||||||
* @param statisticsTotal 统计当日持仓
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int insertStatisticsTotal(StatisticsTotal statisticsTotal)
|
|
||||||
{
|
|
||||||
return statisticsTotalMapper.insertStatisticsTotal(statisticsTotal);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改统计当日持仓
|
|
||||||
*
|
|
||||||
* @param statisticsTotal 统计当日持仓
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int updateStatisticsTotal(StatisticsTotal statisticsTotal)
|
|
||||||
{
|
|
||||||
return statisticsTotalMapper.updateStatisticsTotal(statisticsTotal);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除统计当日持仓
|
|
||||||
*
|
|
||||||
* @param ids 需要删除的统计当日持仓主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteStatisticsTotalByIds(Long[] ids)
|
|
||||||
{
|
|
||||||
return statisticsTotalMapper.deleteStatisticsTotalByIds(ids);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除统计当日持仓信息
|
|
||||||
*
|
|
||||||
* @param id 统计当日持仓主键
|
|
||||||
* @return 结果
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public int deleteStatisticsTotalById(Long id)
|
|
||||||
{
|
|
||||||
return statisticsTotalMapper.deleteStatisticsTotalById(id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,91 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.ruoyi.booksystem.mapper.AccountMapper">
|
|
||||||
|
|
||||||
<resultMap type="Account" id="AccountResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="tradeDay" column="trade_day" />
|
|
||||||
<result property="weekDay" column="week_day" />
|
|
||||||
<result property="assets" column="assets" />
|
|
||||||
<result property="totalAssets" column="total_assets" />
|
|
||||||
<result property="profit" column="profit" />
|
|
||||||
<result property="assetsDiff" column="assets_diff" />
|
|
||||||
<result property="totalDiff" column="total_diff" />
|
|
||||||
<result property="userId" column="user_id" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectAccountVo">
|
|
||||||
select id, trade_day, week_day, assets, total_assets, profit, assets_diff, total_diff, user_id from account
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectAccountList" parameterType="Account" resultMap="AccountResult">
|
|
||||||
<include refid="selectAccountVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="tradeDay != null "> and trade_day = #{tradeDay}</if>
|
|
||||||
<if test="weekDay != null "> and week_day = #{weekDay}</if>
|
|
||||||
<if test="assets != null "> and assets = #{assets}</if>
|
|
||||||
<if test="totalAssets != null "> and total_assets = #{totalAssets}</if>
|
|
||||||
<if test="profit != null "> and profit = #{profit}</if>
|
|
||||||
<if test="assetsDiff != null "> and assets_diff = #{assetsDiff}</if>
|
|
||||||
<if test="totalDiff != null "> and total_diff = #{totalDiff}</if>
|
|
||||||
<if test="userId != null "> and user_id = #{userId}</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectAccountById" parameterType="Long" resultMap="AccountResult">
|
|
||||||
<include refid="selectAccountVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertAccount" parameterType="Account" useGeneratedKeys="true" keyProperty="id">
|
|
||||||
insert into account
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="tradeDay != null">trade_day,</if>
|
|
||||||
<if test="weekDay != null">week_day,</if>
|
|
||||||
<if test="assets != null">assets,</if>
|
|
||||||
<if test="totalAssets != null">total_assets,</if>
|
|
||||||
<if test="profit != null">profit,</if>
|
|
||||||
<if test="assetsDiff != null">assets_diff,</if>
|
|
||||||
<if test="totalDiff != null">total_diff,</if>
|
|
||||||
<if test="userId != null">user_id,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="tradeDay != null">#{tradeDay},</if>
|
|
||||||
<if test="weekDay != null">#{weekDay},</if>
|
|
||||||
<if test="assets != null">#{assets},</if>
|
|
||||||
<if test="totalAssets != null">#{totalAssets},</if>
|
|
||||||
<if test="profit != null">#{profit},</if>
|
|
||||||
<if test="assetsDiff != null">#{assetsDiff},</if>
|
|
||||||
<if test="totalDiff != null">#{totalDiff},</if>
|
|
||||||
<if test="userId != null">#{userId},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateAccount" parameterType="Account">
|
|
||||||
update account
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="tradeDay != null">trade_day = #{tradeDay},</if>
|
|
||||||
<if test="weekDay != null">week_day = #{weekDay},</if>
|
|
||||||
<if test="assets != null">assets = #{assets},</if>
|
|
||||||
<if test="totalAssets != null">total_assets = #{totalAssets},</if>
|
|
||||||
<if test="profit != null">profit = #{profit},</if>
|
|
||||||
<if test="assetsDiff != null">assets_diff = #{assetsDiff},</if>
|
|
||||||
<if test="totalDiff != null">total_diff = #{totalDiff},</if>
|
|
||||||
<if test="userId != null">user_id = #{userId},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteAccountById" parameterType="Long">
|
|
||||||
delete from account where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteAccountByIds" parameterType="String">
|
|
||||||
delete from account where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
|
||||||
@ -1,131 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.ruoyi.booksystem.mapper.OperationsMapper">
|
|
||||||
|
|
||||||
<resultMap type="Operations" id="OperationsResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="code" column="code" />
|
|
||||||
<result property="name" column="name" />
|
|
||||||
<result property="tradeDay" column="trade_day" />
|
|
||||||
<result property="weekDay" column="week_day" />
|
|
||||||
<result property="operate" column="operate" />
|
|
||||||
<result property="dealPrice" column="deal_price" />
|
|
||||||
<result property="volumn" column="volumn" />
|
|
||||||
<result property="amount" column="amount" />
|
|
||||||
<result property="tax" column="tax" />
|
|
||||||
<result property="fee" column="fee" />
|
|
||||||
<result property="other" column="other" />
|
|
||||||
<result property="operateDiff" column="operate_diff" />
|
|
||||||
<result property="preId" column="pre_id" />
|
|
||||||
<result property="userId" column="user_id" />
|
|
||||||
<result property="dealLogic" column="deal_logic" />
|
|
||||||
<result property="bz" column="bz" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectOperationsVo">
|
|
||||||
select id, code, name, trade_day, week_day, operate, deal_price, volumn, amount, tax, fee, other, operate_diff, pre_id, user_id, deal_logic, bz from operations
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectOperationsList" parameterType="Operations" resultMap="OperationsResult">
|
|
||||||
<include refid="selectOperationsVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
||||||
<if test="tradeDay != null "> and trade_day = #{tradeDay}</if>
|
|
||||||
<if test="weekDay != null "> and week_day = #{weekDay}</if>
|
|
||||||
<if test="operate != null and operate != ''"> and operate = #{operate}</if>
|
|
||||||
<if test="dealPrice != null "> and deal_price = #{dealPrice}</if>
|
|
||||||
<if test="volumn != null "> and volumn = #{volumn}</if>
|
|
||||||
<if test="amount != null "> and amount = #{amount}</if>
|
|
||||||
<if test="tax != null "> and tax = #{tax}</if>
|
|
||||||
<if test="fee != null "> and fee = #{fee}</if>
|
|
||||||
<if test="other != null "> and other = #{other}</if>
|
|
||||||
<if test="operateDiff != null "> and operate_diff = #{operateDiff}</if>
|
|
||||||
<if test="preId != null "> and pre_id = #{preId}</if>
|
|
||||||
<if test="userId != null "> and user_id = #{userId}</if>
|
|
||||||
<if test="dealLogic != null and dealLogic != ''"> and deal_logic = #{dealLogic}</if>
|
|
||||||
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectOperationsById" parameterType="Long" resultMap="OperationsResult">
|
|
||||||
<include refid="selectOperationsVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertOperations" parameterType="Operations" useGeneratedKeys="true" keyProperty="id">
|
|
||||||
insert into operations
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">code,</if>
|
|
||||||
<if test="name != null">name,</if>
|
|
||||||
<if test="tradeDay != null">trade_day,</if>
|
|
||||||
<if test="weekDay != null">week_day,</if>
|
|
||||||
<if test="operate != null and operate != ''">operate,</if>
|
|
||||||
<if test="dealPrice != null">deal_price,</if>
|
|
||||||
<if test="volumn != null">volumn,</if>
|
|
||||||
<if test="amount != null">amount,</if>
|
|
||||||
<if test="tax != null">tax,</if>
|
|
||||||
<if test="fee != null">fee,</if>
|
|
||||||
<if test="other != null">other,</if>
|
|
||||||
<if test="operateDiff != null">operate_diff,</if>
|
|
||||||
<if test="preId != null">pre_id,</if>
|
|
||||||
<if test="userId != null">user_id,</if>
|
|
||||||
<if test="dealLogic != null">deal_logic,</if>
|
|
||||||
<if test="bz != null">bz,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">#{code},</if>
|
|
||||||
<if test="name != null">#{name},</if>
|
|
||||||
<if test="tradeDay != null">#{tradeDay},</if>
|
|
||||||
<if test="weekDay != null">#{weekDay},</if>
|
|
||||||
<if test="operate != null and operate != ''">#{operate},</if>
|
|
||||||
<if test="dealPrice != null">#{dealPrice},</if>
|
|
||||||
<if test="volumn != null">#{volumn},</if>
|
|
||||||
<if test="amount != null">#{amount},</if>
|
|
||||||
<if test="tax != null">#{tax},</if>
|
|
||||||
<if test="fee != null">#{fee},</if>
|
|
||||||
<if test="other != null">#{other},</if>
|
|
||||||
<if test="operateDiff != null">#{operateDiff},</if>
|
|
||||||
<if test="preId != null">#{preId},</if>
|
|
||||||
<if test="userId != null">#{userId},</if>
|
|
||||||
<if test="dealLogic != null">#{dealLogic},</if>
|
|
||||||
<if test="bz != null">#{bz},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateOperations" parameterType="Operations">
|
|
||||||
update operations
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">code = #{code},</if>
|
|
||||||
<if test="name != null">name = #{name},</if>
|
|
||||||
<if test="tradeDay != null">trade_day = #{tradeDay},</if>
|
|
||||||
<if test="weekDay != null">week_day = #{weekDay},</if>
|
|
||||||
<if test="operate != null and operate != ''">operate = #{operate},</if>
|
|
||||||
<if test="dealPrice != null">deal_price = #{dealPrice},</if>
|
|
||||||
<if test="volumn != null">volumn = #{volumn},</if>
|
|
||||||
<if test="amount != null">amount = #{amount},</if>
|
|
||||||
<if test="tax != null">tax = #{tax},</if>
|
|
||||||
<if test="fee != null">fee = #{fee},</if>
|
|
||||||
<if test="other != null">other = #{other},</if>
|
|
||||||
<if test="operateDiff != null">operate_diff = #{operateDiff},</if>
|
|
||||||
<if test="preId != null">pre_id = #{preId},</if>
|
|
||||||
<if test="userId != null">user_id = #{userId},</if>
|
|
||||||
<if test="dealLogic != null">deal_logic = #{dealLogic},</if>
|
|
||||||
<if test="bz != null">bz = #{bz},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteOperationsById" parameterType="Long">
|
|
||||||
delete from operations where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteOperationsByIds" parameterType="String">
|
|
||||||
delete from operations where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
|
||||||
@ -1,101 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.ruoyi.booksystem.mapper.StatisticsMapper">
|
|
||||||
|
|
||||||
<resultMap type="Statistics" id="StatisticsResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="code" column="code" />
|
|
||||||
<result property="name" column="name" />
|
|
||||||
<result property="tradeDay" column="trade_day" />
|
|
||||||
<result property="weekDay" column="week_day" />
|
|
||||||
<result property="operationsId" column="operations_id" />
|
|
||||||
<result property="profit" column="profit" />
|
|
||||||
<result property="diff" column="diff" />
|
|
||||||
<result property="operateionId" column="operateion_id" />
|
|
||||||
<result property="userId" column="user_id" />
|
|
||||||
<result property="bz" column="bz" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectStatisticsVo">
|
|
||||||
select id, code, name, trade_day, week_day, operations_id, profit, diff, operateion_id, user_id, bz from statistics
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectStatisticsList" parameterType="Statistics" resultMap="StatisticsResult">
|
|
||||||
<include refid="selectStatisticsVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
||||||
<if test="tradeDay != null "> and trade_day = #{tradeDay}</if>
|
|
||||||
<if test="weekDay != null "> and week_day = #{weekDay}</if>
|
|
||||||
<if test="operationsId != null and operationsId != ''"> and operations_id = #{operationsId}</if>
|
|
||||||
<if test="profit != null "> and profit = #{profit}</if>
|
|
||||||
<if test="diff != null "> and diff = #{diff}</if>
|
|
||||||
<if test="operateionId != null "> and operateion_id = #{operateionId}</if>
|
|
||||||
<if test="userId != null "> and user_id = #{userId}</if>
|
|
||||||
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectStatisticsById" parameterType="Long" resultMap="StatisticsResult">
|
|
||||||
<include refid="selectStatisticsVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertStatistics" parameterType="Statistics" useGeneratedKeys="true" keyProperty="id">
|
|
||||||
insert into statistics
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">code,</if>
|
|
||||||
<if test="name != null">name,</if>
|
|
||||||
<if test="tradeDay != null">trade_day,</if>
|
|
||||||
<if test="weekDay != null">week_day,</if>
|
|
||||||
<if test="operationsId != null and operationsId != ''">operations_id,</if>
|
|
||||||
<if test="profit != null">profit,</if>
|
|
||||||
<if test="diff != null">diff,</if>
|
|
||||||
<if test="operateionId != null">operateion_id,</if>
|
|
||||||
<if test="userId != null">user_id,</if>
|
|
||||||
<if test="bz != null">bz,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">#{code},</if>
|
|
||||||
<if test="name != null">#{name},</if>
|
|
||||||
<if test="tradeDay != null">#{tradeDay},</if>
|
|
||||||
<if test="weekDay != null">#{weekDay},</if>
|
|
||||||
<if test="operationsId != null and operationsId != ''">#{operationsId},</if>
|
|
||||||
<if test="profit != null">#{profit},</if>
|
|
||||||
<if test="diff != null">#{diff},</if>
|
|
||||||
<if test="operateionId != null">#{operateionId},</if>
|
|
||||||
<if test="userId != null">#{userId},</if>
|
|
||||||
<if test="bz != null">#{bz},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateStatistics" parameterType="Statistics">
|
|
||||||
update statistics
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">code = #{code},</if>
|
|
||||||
<if test="name != null">name = #{name},</if>
|
|
||||||
<if test="tradeDay != null">trade_day = #{tradeDay},</if>
|
|
||||||
<if test="weekDay != null">week_day = #{weekDay},</if>
|
|
||||||
<if test="operationsId != null and operationsId != ''">operations_id = #{operationsId},</if>
|
|
||||||
<if test="profit != null">profit = #{profit},</if>
|
|
||||||
<if test="diff != null">diff = #{diff},</if>
|
|
||||||
<if test="operateionId != null">operateion_id = #{operateionId},</if>
|
|
||||||
<if test="userId != null">user_id = #{userId},</if>
|
|
||||||
<if test="bz != null">bz = #{bz},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteStatisticsById" parameterType="Long">
|
|
||||||
delete from statistics where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteStatisticsByIds" parameterType="String">
|
|
||||||
delete from statistics where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
|
||||||
@ -1,101 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.ruoyi.booksystem.mapper.StatisticsRemainMapper">
|
|
||||||
|
|
||||||
<resultMap type="StatisticsRemain" id="StatisticsRemainResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="code" column="code" />
|
|
||||||
<result property="name" column="name" />
|
|
||||||
<result property="tradeDay" column="trade_day" />
|
|
||||||
<result property="weekDay" column="week_day" />
|
|
||||||
<result property="totalProfit" column="total_profit" />
|
|
||||||
<result property="totalDiff" column="total_diff" />
|
|
||||||
<result property="totalDiffOverall" column="total_diff_overall" />
|
|
||||||
<result property="remaining" column="remaining" />
|
|
||||||
<result property="userId" column="user_id" />
|
|
||||||
<result property="bz" column="bz" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectStatisticsRemainVo">
|
|
||||||
select id, code, name, trade_day, week_day, total_profit, total_diff, total_diff_overall, remaining, user_id, bz from statistics_remain
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectStatisticsRemainList" parameterType="StatisticsRemain" resultMap="StatisticsRemainResult">
|
|
||||||
<include refid="selectStatisticsRemainVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
||||||
<if test="tradeDay != null "> and trade_day = #{tradeDay}</if>
|
|
||||||
<if test="weekDay != null "> and week_day = #{weekDay}</if>
|
|
||||||
<if test="totalProfit != null "> and total_profit = #{totalProfit}</if>
|
|
||||||
<if test="totalDiff != null "> and total_diff = #{totalDiff}</if>
|
|
||||||
<if test="totalDiffOverall != null "> and total_diff_overall = #{totalDiffOverall}</if>
|
|
||||||
<if test="remaining != null "> and remaining = #{remaining}</if>
|
|
||||||
<if test="userId != null "> and user_id = #{userId}</if>
|
|
||||||
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectStatisticsRemainById" parameterType="Long" resultMap="StatisticsRemainResult">
|
|
||||||
<include refid="selectStatisticsRemainVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertStatisticsRemain" parameterType="StatisticsRemain" useGeneratedKeys="true" keyProperty="id">
|
|
||||||
insert into statistics_remain
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">code,</if>
|
|
||||||
<if test="name != null">name,</if>
|
|
||||||
<if test="tradeDay != null">trade_day,</if>
|
|
||||||
<if test="weekDay != null">week_day,</if>
|
|
||||||
<if test="totalProfit != null">total_profit,</if>
|
|
||||||
<if test="totalDiff != null">total_diff,</if>
|
|
||||||
<if test="totalDiffOverall != null">total_diff_overall,</if>
|
|
||||||
<if test="remaining != null">remaining,</if>
|
|
||||||
<if test="userId != null">user_id,</if>
|
|
||||||
<if test="bz != null">bz,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">#{code},</if>
|
|
||||||
<if test="name != null">#{name},</if>
|
|
||||||
<if test="tradeDay != null">#{tradeDay},</if>
|
|
||||||
<if test="weekDay != null">#{weekDay},</if>
|
|
||||||
<if test="totalProfit != null">#{totalProfit},</if>
|
|
||||||
<if test="totalDiff != null">#{totalDiff},</if>
|
|
||||||
<if test="totalDiffOverall != null">#{totalDiffOverall},</if>
|
|
||||||
<if test="remaining != null">#{remaining},</if>
|
|
||||||
<if test="userId != null">#{userId},</if>
|
|
||||||
<if test="bz != null">#{bz},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateStatisticsRemain" parameterType="StatisticsRemain">
|
|
||||||
update statistics_remain
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">code = #{code},</if>
|
|
||||||
<if test="name != null">name = #{name},</if>
|
|
||||||
<if test="tradeDay != null">trade_day = #{tradeDay},</if>
|
|
||||||
<if test="weekDay != null">week_day = #{weekDay},</if>
|
|
||||||
<if test="totalProfit != null">total_profit = #{totalProfit},</if>
|
|
||||||
<if test="totalDiff != null">total_diff = #{totalDiff},</if>
|
|
||||||
<if test="totalDiffOverall != null">total_diff_overall = #{totalDiffOverall},</if>
|
|
||||||
<if test="remaining != null">remaining = #{remaining},</if>
|
|
||||||
<if test="userId != null">user_id = #{userId},</if>
|
|
||||||
<if test="bz != null">bz = #{bz},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteStatisticsRemainById" parameterType="Long">
|
|
||||||
delete from statistics_remain where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteStatisticsRemainByIds" parameterType="String">
|
|
||||||
delete from statistics_remain where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
|
||||||
@ -1,131 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
|
||||||
<!DOCTYPE mapper
|
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
||||||
<mapper namespace="com.ruoyi.booksystem.mapper.StatisticsTotalMapper">
|
|
||||||
|
|
||||||
<resultMap type="StatisticsTotal" id="StatisticsTotalResult">
|
|
||||||
<result property="id" column="id" />
|
|
||||||
<result property="code" column="code" />
|
|
||||||
<result property="name" column="name" />
|
|
||||||
<result property="startTradeDay" column="start_trade_day" />
|
|
||||||
<result property="endTradeDay" column="end_trade_day" />
|
|
||||||
<result property="totalProfit" column="total_profit" />
|
|
||||||
<result property="totalDiff" column="total_diff" />
|
|
||||||
<result property="startPrice" column="start_price" />
|
|
||||||
<result property="endPrice" column="end_price" />
|
|
||||||
<result property="volumnTotal" column="volumn_total" />
|
|
||||||
<result property="amountTotal" column="amount_total" />
|
|
||||||
<result property="operateTimes" column="operate_times" />
|
|
||||||
<result property="fee" column="fee" />
|
|
||||||
<result property="tax" column="tax" />
|
|
||||||
<result property="other" column="other" />
|
|
||||||
<result property="userId" column="user_id" />
|
|
||||||
<result property="bz" column="bz" />
|
|
||||||
</resultMap>
|
|
||||||
|
|
||||||
<sql id="selectStatisticsTotalVo">
|
|
||||||
select id, code, name, start_trade_day, end_trade_day, total_profit, total_diff, start_price, end_price, volumn_total, amount_total, operate_times, fee, tax, other, user_id, bz from statistics_total
|
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectStatisticsTotalList" parameterType="StatisticsTotal" resultMap="StatisticsTotalResult">
|
|
||||||
<include refid="selectStatisticsTotalVo"/>
|
|
||||||
<where>
|
|
||||||
<if test="code != null and code != ''"> and code = #{code}</if>
|
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
||||||
<if test="startTradeDay != null "> and start_trade_day = #{startTradeDay}</if>
|
|
||||||
<if test="endTradeDay != null "> and end_trade_day = #{endTradeDay}</if>
|
|
||||||
<if test="totalProfit != null "> and total_profit = #{totalProfit}</if>
|
|
||||||
<if test="totalDiff != null "> and total_diff = #{totalDiff}</if>
|
|
||||||
<if test="startPrice != null "> and start_price = #{startPrice}</if>
|
|
||||||
<if test="endPrice != null "> and end_price = #{endPrice}</if>
|
|
||||||
<if test="volumnTotal != null "> and volumn_total = #{volumnTotal}</if>
|
|
||||||
<if test="amountTotal != null "> and amount_total = #{amountTotal}</if>
|
|
||||||
<if test="operateTimes != null "> and operate_times = #{operateTimes}</if>
|
|
||||||
<if test="fee != null "> and fee = #{fee}</if>
|
|
||||||
<if test="tax != null "> and tax = #{tax}</if>
|
|
||||||
<if test="other != null "> and other = #{other}</if>
|
|
||||||
<if test="userId != null "> and user_id = #{userId}</if>
|
|
||||||
<if test="bz != null and bz != ''"> and bz = #{bz}</if>
|
|
||||||
</where>
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectStatisticsTotalById" parameterType="Long" resultMap="StatisticsTotalResult">
|
|
||||||
<include refid="selectStatisticsTotalVo"/>
|
|
||||||
where id = #{id}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<insert id="insertStatisticsTotal" parameterType="StatisticsTotal" useGeneratedKeys="true" keyProperty="id">
|
|
||||||
insert into statistics_total
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">code,</if>
|
|
||||||
<if test="name != null">name,</if>
|
|
||||||
<if test="startTradeDay != null">start_trade_day,</if>
|
|
||||||
<if test="endTradeDay != null">end_trade_day,</if>
|
|
||||||
<if test="totalProfit != null">total_profit,</if>
|
|
||||||
<if test="totalDiff != null">total_diff,</if>
|
|
||||||
<if test="startPrice != null">start_price,</if>
|
|
||||||
<if test="endPrice != null">end_price,</if>
|
|
||||||
<if test="volumnTotal != null">volumn_total,</if>
|
|
||||||
<if test="amountTotal != null">amount_total,</if>
|
|
||||||
<if test="operateTimes != null">operate_times,</if>
|
|
||||||
<if test="fee != null">fee,</if>
|
|
||||||
<if test="tax != null">tax,</if>
|
|
||||||
<if test="other != null">other,</if>
|
|
||||||
<if test="userId != null">user_id,</if>
|
|
||||||
<if test="bz != null">bz,</if>
|
|
||||||
</trim>
|
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">#{code},</if>
|
|
||||||
<if test="name != null">#{name},</if>
|
|
||||||
<if test="startTradeDay != null">#{startTradeDay},</if>
|
|
||||||
<if test="endTradeDay != null">#{endTradeDay},</if>
|
|
||||||
<if test="totalProfit != null">#{totalProfit},</if>
|
|
||||||
<if test="totalDiff != null">#{totalDiff},</if>
|
|
||||||
<if test="startPrice != null">#{startPrice},</if>
|
|
||||||
<if test="endPrice != null">#{endPrice},</if>
|
|
||||||
<if test="volumnTotal != null">#{volumnTotal},</if>
|
|
||||||
<if test="amountTotal != null">#{amountTotal},</if>
|
|
||||||
<if test="operateTimes != null">#{operateTimes},</if>
|
|
||||||
<if test="fee != null">#{fee},</if>
|
|
||||||
<if test="tax != null">#{tax},</if>
|
|
||||||
<if test="other != null">#{other},</if>
|
|
||||||
<if test="userId != null">#{userId},</if>
|
|
||||||
<if test="bz != null">#{bz},</if>
|
|
||||||
</trim>
|
|
||||||
</insert>
|
|
||||||
|
|
||||||
<update id="updateStatisticsTotal" parameterType="StatisticsTotal">
|
|
||||||
update statistics_total
|
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
|
||||||
<if test="code != null and code != ''">code = #{code},</if>
|
|
||||||
<if test="name != null">name = #{name},</if>
|
|
||||||
<if test="startTradeDay != null">start_trade_day = #{startTradeDay},</if>
|
|
||||||
<if test="endTradeDay != null">end_trade_day = #{endTradeDay},</if>
|
|
||||||
<if test="totalProfit != null">total_profit = #{totalProfit},</if>
|
|
||||||
<if test="totalDiff != null">total_diff = #{totalDiff},</if>
|
|
||||||
<if test="startPrice != null">start_price = #{startPrice},</if>
|
|
||||||
<if test="endPrice != null">end_price = #{endPrice},</if>
|
|
||||||
<if test="volumnTotal != null">volumn_total = #{volumnTotal},</if>
|
|
||||||
<if test="amountTotal != null">amount_total = #{amountTotal},</if>
|
|
||||||
<if test="operateTimes != null">operate_times = #{operateTimes},</if>
|
|
||||||
<if test="fee != null">fee = #{fee},</if>
|
|
||||||
<if test="tax != null">tax = #{tax},</if>
|
|
||||||
<if test="other != null">other = #{other},</if>
|
|
||||||
<if test="userId != null">user_id = #{userId},</if>
|
|
||||||
<if test="bz != null">bz = #{bz},</if>
|
|
||||||
</trim>
|
|
||||||
where id = #{id}
|
|
||||||
</update>
|
|
||||||
|
|
||||||
<delete id="deleteStatisticsTotalById" parameterType="Long">
|
|
||||||
delete from statistics_total where id = #{id}
|
|
||||||
</delete>
|
|
||||||
|
|
||||||
<delete id="deleteStatisticsTotalByIds" parameterType="String">
|
|
||||||
delete from statistics_total where id in
|
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
||||||
#{id}
|
|
||||||
</foreach>
|
|
||||||
</delete>
|
|
||||||
</mapper>
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询交易账户列表
|
|
||||||
export function listAccount(query) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/account/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询交易账户详细
|
|
||||||
export function getAccount(id) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/account/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增交易账户
|
|
||||||
export function addAccount(data) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/account',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改交易账户
|
|
||||||
export function updateAccount(data) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/account',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除交易账户
|
|
||||||
export function delAccount(id) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/account/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询当日操作列表
|
|
||||||
export function listOperations(query) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/operations/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询当日操作详细
|
|
||||||
export function getOperations(id) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/operations/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增当日操作
|
|
||||||
export function addOperations(data) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/operations',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改当日操作
|
|
||||||
export function updateOperations(data) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/operations',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除当日操作
|
|
||||||
export function delOperations(id) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/operations/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询当日持仓统计列表
|
|
||||||
export function listStatisticremain(query) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statisticremain/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询当日持仓统计详细
|
|
||||||
export function getStatisticremain(id) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statisticremain/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增当日持仓统计
|
|
||||||
export function addStatisticremain(data) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statisticremain',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改当日持仓统计
|
|
||||||
export function updateStatisticremain(data) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statisticremain',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除当日持仓统计
|
|
||||||
export function delStatisticremain(id) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statisticremain/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询单笔操作统计列表
|
|
||||||
export function listStatistics(query) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statistics/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询单笔操作统计详细
|
|
||||||
export function getStatistics(id) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statistics/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增单笔操作统计
|
|
||||||
export function addStatistics(data) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statistics',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改单笔操作统计
|
|
||||||
export function updateStatistics(data) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statistics',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除单笔操作统计
|
|
||||||
export function delStatistics(id) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statistics/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
// 查询统计当日持仓列表
|
|
||||||
export function listStatistictotal(query) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statistictotal/list',
|
|
||||||
method: 'get',
|
|
||||||
params: query
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询统计当日持仓详细
|
|
||||||
export function getStatistictotal(id) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statistictotal/' + id,
|
|
||||||
method: 'get'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增统计当日持仓
|
|
||||||
export function addStatistictotal(data) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statistictotal',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改统计当日持仓
|
|
||||||
export function updateStatistictotal(data) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statistictotal',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// 删除统计当日持仓
|
|
||||||
export function delStatistictotal(id) {
|
|
||||||
return request({
|
|
||||||
url: '/booksystem/statistictotal/' + id,
|
|
||||||
method: 'delete'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
@ -1,306 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="交易日期" prop="tradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="queryParams.tradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择交易日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['booksystem:account:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['booksystem:account:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['booksystem:account:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['booksystem:account:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="accountList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="交易日期" align="center" prop="tradeDay" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.tradeDay, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="星期" align="center" prop="weekDay" width="180" />
|
|
||||||
<el-table-column label="净资产" align="center" prop="assets" />
|
|
||||||
<el-table-column label="总资产" align="center" prop="totalAssets" />
|
|
||||||
<el-table-column label="当日盈亏" align="center" prop="profit" />
|
|
||||||
<el-table-column label="当日净资产盈亏比例" align="center" prop="assetsDiff" />
|
|
||||||
<el-table-column label="当日总资产盈亏比例" align="center" prop="totalDiff" />
|
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-edit"-->
|
|
||||||
<!-- @click="handleUpdate(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['booksystem:account:edit']"-->
|
|
||||||
<!-- >修改</el-button>-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- @click="handleDelete(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['booksystem:account:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改交易账户对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="交易日期" prop="tradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
@change="handleChange"
|
|
||||||
v-model="form.tradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择交易日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="净资产" prop="assets">
|
|
||||||
<el-input v-model="form.assets" placeholder="请输入净资产" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总资产" prop="totalAssets">
|
|
||||||
<el-input v-model="form.totalAssets" placeholder="请输入总资产" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="当日盈亏" prop="profit">
|
|
||||||
<el-input v-model="form.profit" placeholder="请输入当日盈亏" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="当日净资产盈亏比例" prop="assetsDiff">
|
|
||||||
<el-input v-model="form.assetsDiff" placeholder="请输入当日净资产盈亏比例" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="当日总资产盈亏比例" prop="totalDiff">
|
|
||||||
<el-input v-model="form.totalDiff" placeholder="请输入当日总资产盈亏比例" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户id" prop="userId">
|
|
||||||
<el-input v-model="form.userId" placeholder="请输入用户id" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { listAccount, getAccount, delAccount, addAccount, updateAccount } from "@/api/booksystem/account";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Account",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 交易账户表格数据
|
|
||||||
accountList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
tradeDay: null,
|
|
||||||
weekDay: null,
|
|
||||||
assets: null,
|
|
||||||
totalAssets: null,
|
|
||||||
profit: null,
|
|
||||||
assetsDiff: null,
|
|
||||||
totalDiff: null,
|
|
||||||
userId: null
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
},
|
|
||||||
//计算星期
|
|
||||||
weekOptions :['周日','周一', '周二', '周三', '周四', '周五', '周六'],
|
|
||||||
checkedWeek: [],
|
|
||||||
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询交易账户列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listAccount(this.queryParams).then(response => {
|
|
||||||
this.accountList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
tradeDay: null,
|
|
||||||
weekDay: null,
|
|
||||||
assets: null,
|
|
||||||
totalAssets: null,
|
|
||||||
profit: null,
|
|
||||||
assetsDiff: null,
|
|
||||||
totalDiff: null,
|
|
||||||
userId: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加交易账户";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getAccount(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改交易账户";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateAccount(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addAccount(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除交易账户编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delAccount(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('booksystem/account/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `account_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
|
||||||
handleChange(value)
|
|
||||||
{
|
|
||||||
let currentDate = new Date(this.queryParams.tradeDay);
|
|
||||||
const getWeek = currentDate.getDay();
|
|
||||||
const weekArr=['周日','周一', '周二', '周三', '周四', '周五', '周六']
|
|
||||||
if(!value) return
|
|
||||||
let week = weekArr[getWeek]
|
|
||||||
this.form.weekDay = week;
|
|
||||||
console.log(' to handleDateChange week is: ',week)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@ -1,435 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="股票代码" prop="code">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.code"
|
|
||||||
placeholder="请输入股票代码"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="股票名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入股票名称"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="交易日期" prop="tradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="queryParams.tradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择交易日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['booksystem:operations:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['booksystem:operations:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['booksystem:operations:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['booksystem:operations:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="operationsList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="股票代码" align="center" prop="code" />
|
|
||||||
<el-table-column label="股票名称" align="center" prop="name" />
|
|
||||||
<el-table-column label="交易日期" align="center" prop="tradeDay" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.tradeDay, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="星期" align="center" prop="weekDay" width="180"/>
|
|
||||||
<el-table-column label="操作" align="center" prop="operate" />
|
|
||||||
<el-table-column label="交易价格" align="center" prop="dealPrice" />
|
|
||||||
<el-table-column label="成交量" align="center" prop="volumn" />
|
|
||||||
<el-table-column label="成交额" align="center" prop="amount" />
|
|
||||||
<el-table-column label="印花税" align="center" prop="tax" />
|
|
||||||
<el-table-column label="手续费" align="center" prop="fee" />
|
|
||||||
<el-table-column label="其他费用" align="center" prop="other" />
|
|
||||||
<el-table-column label="操作时涨跌" align="center" prop="operateDiff" />
|
|
||||||
<el-table-column label="关联操作id" align="center" prop="preId" />
|
|
||||||
<el-table-column label="操作逻辑" align="center" prop="dealLogic" />
|
|
||||||
<el-table-column label="备注" align="center" prop="bz" />
|
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-edit"-->
|
|
||||||
<!-- @click="handleUpdate(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['booksystem:operations:edit']"-->
|
|
||||||
<!-- >修改</el-button>-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- @click="handleDelete(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['booksystem:operations:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改当日操作对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="70%" append-to-body :before-close="handleClose">
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-row>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="股票代码" prop="code">
|
|
||||||
<el-input v-model="form.code" placeholder="请输入股票代码" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="股票名称" prop="name">
|
|
||||||
<el-input v-model="form.name" placeholder="请输入股票名称" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="交易日期" prop="tradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
@change="handleChange"
|
|
||||||
v-model="form.tradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择交易日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="操作" prop="operate">
|
|
||||||
<el-select v-model="form.operate" placeholder="请输入操作">
|
|
||||||
<el-option
|
|
||||||
v-for="item in operate_options"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="交易价格" prop="dealPrice">
|
|
||||||
<el-input v-model="form.dealPrice" placeholder="请输入交易价格" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="成交量" prop="volumn">
|
|
||||||
<el-input v-model="form.volumn" placeholder="请输入成交量" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="成交额" prop="amount">
|
|
||||||
<el-input v-model="form.amount" placeholder="请输入成交额" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="印花税" prop="tax">
|
|
||||||
<el-input v-model="form.tax" placeholder="请输入印花税" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="手续费" prop="fee">
|
|
||||||
<el-input v-model="form.fee" placeholder="请输入手续费" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="其他费用" prop="other">
|
|
||||||
<el-input v-model="form.other" placeholder="请输入其他费用" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="操作时涨跌" prop="operateDiff">
|
|
||||||
<el-input v-model="form.operateDiff" placeholder="请输入操作时涨跌" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col span="8">
|
|
||||||
<el-form-item label="关联操作id" prop="preId">
|
|
||||||
<el-input v-model="form.preId" placeholder="请输入关联操作id" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col span="24">
|
|
||||||
<el-form-item label="操作逻辑" prop="dealLogic">
|
|
||||||
<el-input v-model="form.dealLogic" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col span="24">
|
|
||||||
<el-form-item label="备注" prop="bz">
|
|
||||||
<el-input v-model="form.bz" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { listOperations, getOperations, delOperations, addOperations, updateOperations } from "@/api/booksystem/operations";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Operations",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 当日操作表格数据
|
|
||||||
operationsList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
tradeDay: null,
|
|
||||||
weekDay: null,
|
|
||||||
operate: null,
|
|
||||||
dealPrice: null,
|
|
||||||
volumn: null,
|
|
||||||
amount: null,
|
|
||||||
tax: null,
|
|
||||||
fee: null,
|
|
||||||
other: null,
|
|
||||||
operateDiff: null,
|
|
||||||
preId: null,
|
|
||||||
userId: null,
|
|
||||||
dealLogic: null,
|
|
||||||
bz: null
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
code: [
|
|
||||||
{ required: true, message: "股票代码不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
operate: [
|
|
||||||
{ required: true, message: "操作不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
},
|
|
||||||
//操作的下拉选择
|
|
||||||
operate_options: [{
|
|
||||||
value: '买入',
|
|
||||||
label: '买入'
|
|
||||||
}, {
|
|
||||||
value: '卖出',
|
|
||||||
label: '卖出'
|
|
||||||
}],
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询当日操作列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listOperations(this.queryParams).then(response => {
|
|
||||||
this.operationsList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
tradeDay: null,
|
|
||||||
weekDay: null,
|
|
||||||
operate: null,
|
|
||||||
dealPrice: null,
|
|
||||||
volumn: null,
|
|
||||||
amount: null,
|
|
||||||
tax: null,
|
|
||||||
fee: null,
|
|
||||||
other: null,
|
|
||||||
operateDiff: null,
|
|
||||||
preId: null,
|
|
||||||
userId: null,
|
|
||||||
dealLogic: null,
|
|
||||||
bz: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加当日操作";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getOperations(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改当日操作";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateOperations(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addOperations(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除当日操作编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delOperations(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('booksystem/operations/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `operations_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
|
||||||
//计算星期
|
|
||||||
handleChange(value)
|
|
||||||
{
|
|
||||||
let currentDate = new Date(this.queryParams.tradeDay);
|
|
||||||
const getWeek = currentDate.getDay();
|
|
||||||
const weekArr=['周日','周一', '周二', '周三', '周四', '周五', '周六']
|
|
||||||
if(!value) return
|
|
||||||
let week = weekArr[getWeek]
|
|
||||||
this.form.weekDay = week;
|
|
||||||
console.log(' to handleDateChange week is: ',week)
|
|
||||||
},
|
|
||||||
//处理新增数据对话框关闭
|
|
||||||
handleClose(done) {
|
|
||||||
this.$confirm('确认退出添加操作吗?')
|
|
||||||
.then(_ => {
|
|
||||||
done();
|
|
||||||
})
|
|
||||||
.catch(_ => {});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@ -1,332 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="股票代码" prop="code">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.code"
|
|
||||||
placeholder="请输入股票代码"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="股票名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入股票名称"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="交易日期" prop="tradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="queryParams.tradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择交易日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['booksystem:statisticremain:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['booksystem:statisticremain:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['booksystem:statisticremain:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['booksystem:statisticremain:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="statisticremainList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="股票代码" align="center" prop="code" />
|
|
||||||
<el-table-column label="股票名称" align="center" prop="name" />
|
|
||||||
<el-table-column label="交易日期" align="center" prop="tradeDay" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.tradeDay, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="星期" align="center" prop="weekDay" />
|
|
||||||
<el-table-column label="总盈亏" align="center" prop="totalProfit" />
|
|
||||||
<el-table-column label="总盈亏比例" align="center" prop="totalDiff" />
|
|
||||||
<el-table-column label="总盈亏占整体盈亏比例" align="center" prop="totalDiffOverall" />
|
|
||||||
<el-table-column label="剩余数量" align="center" prop="remaining" />
|
|
||||||
<el-table-column label="备注" align="center" prop="bz" />
|
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-edit"-->
|
|
||||||
<!-- @click="handleUpdate(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['booksystem:statisticremain:edit']"-->
|
|
||||||
<!-- >修改</el-button>-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- @click="handleDelete(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['booksystem:statisticremain:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改当日持仓统计对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="股票代码" prop="code">
|
|
||||||
<el-input v-model="form.code" placeholder="请输入股票代码" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="股票名称" prop="name">
|
|
||||||
<el-input v-model="form.name" placeholder="请输入股票名称" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="交易日期" prop="tradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="form.tradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择交易日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="交易日星期" prop="weekDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="form.weekDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择交易日星期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总盈亏" prop="totalProfit">
|
|
||||||
<el-input v-model="form.totalProfit" placeholder="请输入总盈亏" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总盈亏比例" prop="totalDiff">
|
|
||||||
<el-input v-model="form.totalDiff" placeholder="请输入总盈亏比例" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总盈亏占整体盈亏比例" prop="totalDiffOverall">
|
|
||||||
<el-input v-model="form.totalDiffOverall" placeholder="请输入总盈亏占整体盈亏比例" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="剩余数量" prop="remaining">
|
|
||||||
<el-input v-model="form.remaining" placeholder="请输入剩余数量" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户id" prop="userId">
|
|
||||||
<el-input v-model="form.userId" placeholder="请输入用户id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="bz">
|
|
||||||
<el-input v-model="form.bz" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { listStatisticremain, getStatisticremain, delStatisticremain, addStatisticremain, updateStatisticremain } from "@/api/booksystem/statisticremain";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Statisticremain",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 当日持仓统计表格数据
|
|
||||||
statisticremainList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
tradeDay: null,
|
|
||||||
weekDay: null,
|
|
||||||
totalProfit: null,
|
|
||||||
totalDiff: null,
|
|
||||||
totalDiffOverall: null,
|
|
||||||
remaining: null,
|
|
||||||
userId: null,
|
|
||||||
bz: null
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
code: [
|
|
||||||
{ required: true, message: "股票代码不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询当日持仓统计列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listStatisticremain(this.queryParams).then(response => {
|
|
||||||
this.statisticremainList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
tradeDay: null,
|
|
||||||
weekDay: null,
|
|
||||||
totalProfit: null,
|
|
||||||
totalDiff: null,
|
|
||||||
totalDiffOverall: null,
|
|
||||||
remaining: null,
|
|
||||||
userId: null,
|
|
||||||
bz: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加当日持仓统计";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getStatisticremain(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改当日持仓统计";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateStatisticremain(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addStatisticremain(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除当日持仓统计编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delStatisticremain(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('booksystem/statisticremain/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `statisticremain_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@ -1,317 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="股票代码" prop="code">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.code"
|
|
||||||
placeholder="请输入股票代码"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="股票名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入股票名称"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="交易日期" prop="tradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="queryParams.tradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择交易日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['booksystem:statistics:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['booksystem:statistics:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['booksystem:statistics:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['booksystem:statistics:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="statisticsList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="股票代码" align="center" prop="code" />
|
|
||||||
<el-table-column label="股票名称" align="center" prop="name" />
|
|
||||||
<el-table-column label="交易日期" align="center" prop="tradeDay" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.tradeDay, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="星期" align="center" prop="weekDay" />
|
|
||||||
<el-table-column label="操作id" align="center" prop="operationsId" />
|
|
||||||
<el-table-column label="当笔当日盈亏" align="center" prop="profit" />
|
|
||||||
<el-table-column label="当笔当日盈亏盈亏比例" align="center" prop="diff" />
|
|
||||||
<el-table-column label="操作id" align="center" prop="operateionId" />
|
|
||||||
<el-table-column label="备注" align="center" prop="bz" />
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改单笔操作统计对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="股票代码" prop="code">
|
|
||||||
<el-input v-model="form.code" placeholder="请输入股票代码" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="股票名称" prop="name">
|
|
||||||
<el-input v-model="form.name" placeholder="请输入股票名称" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="交易日期" prop="tradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="form.tradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择交易日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="交易日星期" prop="weekDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="form.weekDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择交易日星期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作id" prop="operationsId">
|
|
||||||
<el-input v-model="form.operationsId" placeholder="请输入操作id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="当笔当日盈亏" prop="profit">
|
|
||||||
<el-input v-model="form.profit" placeholder="请输入当笔当日盈亏" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="当笔当日盈亏盈亏比例" prop="diff">
|
|
||||||
<el-input v-model="form.diff" placeholder="请输入当笔当日盈亏盈亏比例" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="操作id" prop="operateionId">
|
|
||||||
<el-input v-model="form.operateionId" placeholder="请输入操作id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户id" prop="userId">
|
|
||||||
<el-input v-model="form.userId" placeholder="请输入用户id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="bz">
|
|
||||||
<el-input v-model="form.bz" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { listStatistics, getStatistics, delStatistics, addStatistics, updateStatistics } from "@/api/booksystem/statistics";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Statistics",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 单笔操作统计表格数据
|
|
||||||
statisticsList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
tradeDay: null,
|
|
||||||
weekDay: null,
|
|
||||||
operationsId: null,
|
|
||||||
profit: null,
|
|
||||||
diff: null,
|
|
||||||
operateionId: null,
|
|
||||||
userId: null,
|
|
||||||
bz: null
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
code: [
|
|
||||||
{ required: true, message: "股票代码不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
operationsId: [
|
|
||||||
{ required: true, message: "操作id不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询单笔操作统计列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listStatistics(this.queryParams).then(response => {
|
|
||||||
this.statisticsList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
tradeDay: null,
|
|
||||||
weekDay: null,
|
|
||||||
operationsId: null,
|
|
||||||
profit: null,
|
|
||||||
diff: null,
|
|
||||||
operateionId: null,
|
|
||||||
userId: null,
|
|
||||||
bz: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加单笔操作统计";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getStatistics(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改单笔操作统计";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateStatistics(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addStatistics(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除单笔操作统计编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delStatistics(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('booksystem/statistics/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `statistics_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@ -1,380 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="app-container">
|
|
||||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="股票代码" prop="code">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.code"
|
|
||||||
placeholder="请输入股票代码"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="股票名称" prop="name">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.name"
|
|
||||||
placeholder="请输入股票名称"
|
|
||||||
clearable
|
|
||||||
size="small"
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="建仓交易日期" prop="startTradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="queryParams.startTradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择建仓交易日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="清仓交易日星期" prop="endTradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="queryParams.endTradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择清仓交易日星期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="primary"
|
|
||||||
plain
|
|
||||||
icon="el-icon-plus"
|
|
||||||
size="mini"
|
|
||||||
@click="handleAdd"
|
|
||||||
v-hasPermi="['booksystem:statistictotal:add']"
|
|
||||||
>新增</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['booksystem:statistictotal:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['booksystem:statistictotal:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['booksystem:statistictotal:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="statistictotalList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
|
||||||
<el-table-column label="股票代码" align="center" prop="code" />
|
|
||||||
<el-table-column label="股票名称" align="center" prop="name" />
|
|
||||||
<el-table-column label="建仓交易日期" align="center" prop="startTradeDay" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.startTradeDay, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="清仓交易日星期" align="center" prop="endTradeDay" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.endTradeDay, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="总盈亏" align="center" prop="totalProfit" />
|
|
||||||
<el-table-column label="总盈亏比例" align="center" prop="totalDiff" />
|
|
||||||
<el-table-column label="建仓交易价格" align="center" prop="startPrice" />
|
|
||||||
<el-table-column label="建仓交易价格" align="center" prop="endPrice" />
|
|
||||||
<el-table-column label="总成交量" align="center" prop="volumnTotal" />
|
|
||||||
<el-table-column label="总成交额" align="center" prop="amountTotal" />
|
|
||||||
<el-table-column label="交易次数" align="center" prop="operateTimes" />
|
|
||||||
<el-table-column label="总手续费" align="center" prop="fee" />
|
|
||||||
<el-table-column label="总印花税" align="center" prop="tax" />
|
|
||||||
<el-table-column label="总其他费用" align="center" prop="other" />
|
|
||||||
<el-table-column label="备注" align="center" prop="bz" />
|
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-edit"-->
|
|
||||||
<!-- @click="handleUpdate(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['booksystem:statistictotal:edit']"-->
|
|
||||||
<!-- >修改</el-button>-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- @click="handleDelete(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['booksystem:statistictotal:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination
|
|
||||||
v-show="total>0"
|
|
||||||
:total="total"
|
|
||||||
:page.sync="queryParams.pageNum"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- 添加或修改统计当日持仓对话框 -->
|
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
||||||
<el-form-item label="股票代码" prop="code">
|
|
||||||
<el-input v-model="form.code" placeholder="请输入股票代码" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="股票名称" prop="name">
|
|
||||||
<el-input v-model="form.name" placeholder="请输入股票名称" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="建仓交易日期" prop="startTradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="form.startTradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择建仓交易日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="清仓交易日星期" prop="endTradeDay">
|
|
||||||
<el-date-picker clearable size="small"
|
|
||||||
v-model="form.endTradeDay"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="选择清仓交易日星期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总盈亏" prop="totalProfit">
|
|
||||||
<el-input v-model="form.totalProfit" placeholder="请输入总盈亏" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总盈亏比例" prop="totalDiff">
|
|
||||||
<el-input v-model="form.totalDiff" placeholder="请输入总盈亏比例" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="建仓交易价格" prop="startPrice">
|
|
||||||
<el-input v-model="form.startPrice" placeholder="请输入建仓交易价格" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="建仓交易价格" prop="endPrice">
|
|
||||||
<el-input v-model="form.endPrice" placeholder="请输入建仓交易价格" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总成交量" prop="volumnTotal">
|
|
||||||
<el-input v-model="form.volumnTotal" placeholder="请输入总成交量" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总成交额" prop="amountTotal">
|
|
||||||
<el-input v-model="form.amountTotal" placeholder="请输入总成交额" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="交易次数" prop="operateTimes">
|
|
||||||
<el-input v-model="form.operateTimes" placeholder="请输入交易次数" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总手续费" prop="fee">
|
|
||||||
<el-input v-model="form.fee" placeholder="请输入总手续费" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总印花税" prop="tax">
|
|
||||||
<el-input v-model="form.tax" placeholder="请输入总印花税" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="总其他费用" prop="other">
|
|
||||||
<el-input v-model="form.other" placeholder="请输入总其他费用" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="用户id" prop="userId">
|
|
||||||
<el-input v-model="form.userId" placeholder="请输入用户id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="bz">
|
|
||||||
<el-input v-model="form.bz" type="textarea" placeholder="请输入内容" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div slot="footer" class="dialog-footer">
|
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
||||||
<el-button @click="cancel">取 消</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { listStatistictotal, getStatistictotal, delStatistictotal, addStatistictotal, updateStatistictotal } from "@/api/booksystem/statistictotal";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: "Statistictotal",
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
// 遮罩层
|
|
||||||
loading: true,
|
|
||||||
// 选中数组
|
|
||||||
ids: [],
|
|
||||||
// 非单个禁用
|
|
||||||
single: true,
|
|
||||||
// 非多个禁用
|
|
||||||
multiple: true,
|
|
||||||
// 显示搜索条件
|
|
||||||
showSearch: true,
|
|
||||||
// 总条数
|
|
||||||
total: 0,
|
|
||||||
// 统计当日持仓表格数据
|
|
||||||
statistictotalList: [],
|
|
||||||
// 弹出层标题
|
|
||||||
title: "",
|
|
||||||
// 是否显示弹出层
|
|
||||||
open: false,
|
|
||||||
// 查询参数
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
startTradeDay: null,
|
|
||||||
endTradeDay: null,
|
|
||||||
totalProfit: null,
|
|
||||||
totalDiff: null,
|
|
||||||
startPrice: null,
|
|
||||||
endPrice: null,
|
|
||||||
volumnTotal: null,
|
|
||||||
amountTotal: null,
|
|
||||||
operateTimes: null,
|
|
||||||
fee: null,
|
|
||||||
tax: null,
|
|
||||||
other: null,
|
|
||||||
userId: null,
|
|
||||||
bz: null
|
|
||||||
},
|
|
||||||
// 表单参数
|
|
||||||
form: {},
|
|
||||||
// 表单校验
|
|
||||||
rules: {
|
|
||||||
code: [
|
|
||||||
{ required: true, message: "股票代码不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
created() {
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
/** 查询统计当日持仓列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listStatistictotal(this.queryParams).then(response => {
|
|
||||||
this.statistictotalList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
|
||||||
cancel() {
|
|
||||||
this.open = false;
|
|
||||||
this.reset();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
code: null,
|
|
||||||
name: null,
|
|
||||||
startTradeDay: null,
|
|
||||||
endTradeDay: null,
|
|
||||||
totalProfit: null,
|
|
||||||
totalDiff: null,
|
|
||||||
startPrice: null,
|
|
||||||
endPrice: null,
|
|
||||||
volumnTotal: null,
|
|
||||||
amountTotal: null,
|
|
||||||
operateTimes: null,
|
|
||||||
fee: null,
|
|
||||||
tax: null,
|
|
||||||
other: null,
|
|
||||||
userId: null,
|
|
||||||
bz: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加统计当日持仓";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getStatistictotal(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改统计当日持仓";
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateStatistictotal(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addStatistictotal(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除统计当日持仓编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delStatistictotal(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('booksystem/statistictotal/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `statistictotal_${new Date().getTime()}.xlsx`)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
-- 菜单 SQL
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('交易账户', '2123', '1', 'account', 'booksystem/account/index', 1, 0, 'C', '0', '0', 'booksystem:account:list', '#', 'admin', sysdate(), '', null, '交易账户菜单');
|
|
||||||
|
|
||||||
-- 按钮父菜单ID
|
|
||||||
SELECT @parentId := LAST_INSERT_ID();
|
|
||||||
|
|
||||||
-- 按钮 SQL
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('交易账户查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'booksystem:account:query', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('交易账户新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'booksystem:account:add', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('交易账户修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'booksystem:account:edit', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('交易账户删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'booksystem:account:remove', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('交易账户导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'booksystem:account:export', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
Navicat Premium Data Transfer
|
|
||||||
|
|
||||||
Source Server : localhost
|
|
||||||
Source Server Type : MySQL
|
|
||||||
Source Server Version : 80022
|
|
||||||
Source Host : localhost:3306
|
|
||||||
Source Schema : ry
|
|
||||||
|
|
||||||
Target Server Type : MySQL
|
|
||||||
Target Server Version : 80022
|
|
||||||
File Encoding : 65001
|
|
||||||
|
|
||||||
Date: 07/04/2022 13:49:59
|
|
||||||
*/
|
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
|
||||||
SET FOREIGN_KEY_CHECKS = 0;
|
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- Table structure for account 账户表;盘后统计或查询时统计
|
|
||||||
-- ----------------------------
|
|
||||||
DROP TABLE IF EXISTS `account`;
|
|
||||||
CREATE TABLE `account` (
|
|
||||||
`id` double NOT NULL AUTO_INCREMENT,
|
|
||||||
`trade_day` date NULL DEFAULT NULL COMMENT '交易日期',
|
|
||||||
`week_day` date NULL DEFAULT NULL COMMENT '交易日星期',
|
|
||||||
`assets` decimal(50, 2) NULL DEFAULT NULL COMMENT '净资产',
|
|
||||||
`total_assets` decimal(50, 2) NULL DEFAULT NULL COMMENT '总资产',
|
|
||||||
`profit` decimal(50, 2) NULL DEFAULT NULL COMMENT '当日盈亏',
|
|
||||||
`assets_diff` decimal(50, 2) NULL DEFAULT NULL COMMENT '当日净资产盈亏比例',
|
|
||||||
`total_diff` decimal(50, 2) NULL DEFAULT NULL COMMENT '当日总资产盈亏比例',
|
|
||||||
`user_id` bigint NULL DEFAULT NULL COMMENT '用户id',
|
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '账户表' ROW_FORMAT = DYNAMIC;
|
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
/*
|
|
||||||
Navicat Premium Data Transfer
|
|
||||||
|
|
||||||
Source Server : localhost
|
|
||||||
Source Server Type : MySQL
|
|
||||||
Source Server Version : 80022
|
|
||||||
Source Host : localhost:3306
|
|
||||||
Source Schema : ry
|
|
||||||
|
|
||||||
Target Server Type : MySQL
|
|
||||||
Target Server Version : 80022
|
|
||||||
File Encoding : 65001
|
|
||||||
|
|
||||||
Date: 07/04/2022 13:49:59
|
|
||||||
*/
|
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
|
||||||
SET FOREIGN_KEY_CHECKS = 0;
|
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- Table structure for operations 操作表
|
|
||||||
-- ----------------------------
|
|
||||||
DROP TABLE IF EXISTS `operations`;
|
|
||||||
CREATE TABLE `operations` (
|
|
||||||
`id` double NOT NULL AUTO_INCREMENT,
|
|
||||||
`code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '股票代码',
|
|
||||||
`name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '股票名称',
|
|
||||||
`trade_day` date NULL DEFAULT NULL COMMENT '交易日期',
|
|
||||||
`week_day` date NULL DEFAULT NULL COMMENT '交易日星期',
|
|
||||||
`operate` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '操作(含账户转入转出)',
|
|
||||||
`deal_price` decimal(50, 2) NULL DEFAULT NULL COMMENT '交易价格',
|
|
||||||
`volumn` decimal(50, 0) NULL DEFAULT NULL COMMENT '成交量',
|
|
||||||
`amount` decimal(50, 2) NULL DEFAULT NULL COMMENT '成交额',
|
|
||||||
`tax` decimal(50, 2) NULL DEFAULT NULL COMMENT '印花税',
|
|
||||||
`fee` decimal(50, 2) NULL DEFAULT NULL COMMENT '手续费',
|
|
||||||
`other` decimal(50, 2) NULL DEFAULT NULL COMMENT '其他费用',
|
|
||||||
`operate_diff` decimal(50, 2) NULL DEFAULT NULL COMMENT '操作时涨跌',
|
|
||||||
`pre_id` double NULL DEFAULT NULL COMMENT '关联操作id',
|
|
||||||
`user_id` bigint NULL DEFAULT NULL COMMENT '用户id',
|
|
||||||
`deal_logic` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '操作逻辑',
|
|
||||||
`bz` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '备注',
|
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '操作表' ROW_FORMAT = DYNAMIC;
|
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
|
||||||
|
|
||||||
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
/*
|
|
||||||
Navicat Premium Data Transfer
|
|
||||||
|
|
||||||
Source Server : localhost
|
|
||||||
Source Server Type : MySQL
|
|
||||||
Source Server Version : 80022
|
|
||||||
Source Host : localhost:3306
|
|
||||||
Source Schema : ry
|
|
||||||
|
|
||||||
Target Server Type : MySQL
|
|
||||||
Target Server Version : 80022
|
|
||||||
File Encoding : 65001
|
|
||||||
|
|
||||||
Date: 07/04/2022 13:49:59
|
|
||||||
*/
|
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
|
||||||
SET FOREIGN_KEY_CHECKS = 0;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- Table structure for account_book 统计表单笔操作;清仓时统计,查询时统计,盘后统计;为当前持仓股
|
|
||||||
-- ----------------------------
|
|
||||||
DROP TABLE IF EXISTS `statistics`;
|
|
||||||
CREATE TABLE `statistics` (
|
|
||||||
`id` double NOT NULL AUTO_INCREMENT,
|
|
||||||
`code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '股票代码',
|
|
||||||
`name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '股票名称',
|
|
||||||
`trade_day` date NULL DEFAULT NULL COMMENT '交易日期',
|
|
||||||
`week_day` date NULL DEFAULT NULL COMMENT '交易日星期',
|
|
||||||
`operations_id` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '操作id',
|
|
||||||
`profit` decimal(50, 2) NULL DEFAULT NULL COMMENT '当笔当日盈亏',
|
|
||||||
`diff` decimal(50, 0) NULL DEFAULT NULL COMMENT '当笔当日盈亏盈亏比例',
|
|
||||||
`operateion_id` double NULL DEFAULT NULL COMMENT '操作id',
|
|
||||||
`user_id` bigint NULL DEFAULT NULL COMMENT '用户id',
|
|
||||||
`bz` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '备注',
|
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '交易记统计表单笔操作' ROW_FORMAT = DYNAMIC;
|
|
||||||
|
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
|
||||||
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
Navicat Premium Data Transfer
|
|
||||||
|
|
||||||
Source Server : localhost
|
|
||||||
Source Server Type : MySQL
|
|
||||||
Source Server Version : 80022
|
|
||||||
Source Host : localhost:3306
|
|
||||||
Source Schema : ry
|
|
||||||
|
|
||||||
Target Server Type : MySQL
|
|
||||||
Target Server Version : 80022
|
|
||||||
File Encoding : 65001
|
|
||||||
|
|
||||||
Date: 07/04/2022 13:49:59
|
|
||||||
*/
|
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
|
||||||
SET FOREIGN_KEY_CHECKS = 0;
|
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- Table structure for account_book 统计表当日持仓,包含当日清仓;清仓时统计,查询时统计,盘后统计;为当前持仓股
|
|
||||||
-- ----------------------------
|
|
||||||
DROP TABLE IF EXISTS `statistics_remain`;
|
|
||||||
CREATE TABLE `statistics_remain` (
|
|
||||||
`id` double NOT NULL AUTO_INCREMENT,
|
|
||||||
`code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '股票代码',
|
|
||||||
`name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '股票名称',
|
|
||||||
`trade_day` date NULL DEFAULT NULL COMMENT '交易日期',
|
|
||||||
`week_day` date NULL DEFAULT NULL COMMENT '交易日星期',
|
|
||||||
`total_profit` decimal(50, 2) NULL DEFAULT NULL COMMENT '总盈亏',
|
|
||||||
`total_diff` decimal(50, 2) NULL DEFAULT NULL COMMENT '总盈亏比例',
|
|
||||||
`total_diff_overall` decimal(50, 2) NULL DEFAULT NULL COMMENT '总盈亏占整体盈亏比例',
|
|
||||||
`remaining` decimal(50, 2) NULL DEFAULT NULL COMMENT '剩余数量',
|
|
||||||
`user_id` bigint NULL DEFAULT NULL COMMENT '用户id',
|
|
||||||
`bz` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '备注',
|
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '统计表当日持仓' ROW_FORMAT = DYNAMIC;
|
|
||||||
|
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
/*
|
|
||||||
Navicat Premium Data Transfer
|
|
||||||
|
|
||||||
Source Server : localhost
|
|
||||||
Source Server Type : MySQL
|
|
||||||
Source Server Version : 80022
|
|
||||||
Source Host : localhost:3306
|
|
||||||
Source Schema : ry
|
|
||||||
|
|
||||||
Target Server Type : MySQL
|
|
||||||
Target Server Version : 80022
|
|
||||||
File Encoding : 65001
|
|
||||||
|
|
||||||
Date: 07/04/2022 13:49:59
|
|
||||||
*/
|
|
||||||
|
|
||||||
SET NAMES utf8mb4;
|
|
||||||
SET FOREIGN_KEY_CHECKS = 0;
|
|
||||||
|
|
||||||
-- ----------------------------
|
|
||||||
-- Table structure for account_book 统计表清仓后操作
|
|
||||||
-- ----------------------------
|
|
||||||
DROP TABLE IF EXISTS `statistics_total`;
|
|
||||||
CREATE TABLE `statistics_total` (
|
|
||||||
`id` double NOT NULL AUTO_INCREMENT,
|
|
||||||
`code` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '股票代码',
|
|
||||||
`name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '股票名称',
|
|
||||||
`start_trade_day` date NULL DEFAULT NULL COMMENT '建仓交易日期',
|
|
||||||
`end_trade_day` date NULL DEFAULT NULL COMMENT '清仓交易日星期',
|
|
||||||
`total_profit` decimal(50, 2) NULL DEFAULT NULL COMMENT '总盈亏',
|
|
||||||
`total_diff` decimal(50, 2) NULL DEFAULT NULL COMMENT '总盈亏比例',
|
|
||||||
`start_price` decimal(50, 2) NULL DEFAULT NULL COMMENT '建仓交易价格',
|
|
||||||
`end_price` decimal(50, 2) NULL DEFAULT NULL COMMENT '建仓交易价格',
|
|
||||||
`volumn_total` decimal(50, 0) NULL DEFAULT NULL COMMENT '总成交量',
|
|
||||||
`amount_total` decimal(50, 2) NULL DEFAULT NULL COMMENT '总成交额',
|
|
||||||
`operate_times` decimal(50, 2) NULL DEFAULT NULL COMMENT '交易次数',
|
|
||||||
`fee` decimal(50, 2) NULL DEFAULT NULL COMMENT '总手续费',
|
|
||||||
`tax` decimal(50, 2) NULL DEFAULT NULL COMMENT '总印花税',
|
|
||||||
`other` decimal(50, 2) NULL DEFAULT NULL COMMENT '总其他费用',
|
|
||||||
`user_id` bigint NULL DEFAULT NULL COMMENT '用户id',
|
|
||||||
`bz` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '备注',
|
|
||||||
PRIMARY KEY (`id`) USING BTREE
|
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '统计表当日持仓' ROW_FORMAT = DYNAMIC;
|
|
||||||
|
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
-- 菜单 SQL
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('当日持仓统计', '2123', '1', 'statisticremain', 'booksystem/statisticremain/index', 1, 0, 'C', '0', '0', 'booksystem:statisticremain:list', '#', 'admin', sysdate(), '', null, '当日持仓统计菜单');
|
|
||||||
|
|
||||||
-- 按钮父菜单ID
|
|
||||||
SELECT @parentId := LAST_INSERT_ID();
|
|
||||||
|
|
||||||
-- 按钮 SQL
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('当日持仓统计查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', 'booksystem:statisticremain:query', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('当日持仓统计新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', 'booksystem:statisticremain:add', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('当日持仓统计修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', 'booksystem:statisticremain:edit', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('当日持仓统计删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', 'booksystem:statisticremain:remove', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
|
|
||||||
insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark)
|
|
||||||
values('当日持仓统计导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', 'booksystem:statisticremain:export', '#', 'admin', sysdate(), '', null, '');
|
|
||||||
Loading…
Reference in new issue