dev
parent
ae80a383fe
commit
b97cebb9ef
@ -0,0 +1,178 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualabnworkhours.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.demo.virsualabnworkhours.entity.TtVirsualAbnWorkhours;
|
||||||
|
import org.jeecg.modules.demo.virsualabnworkhours.service.ITtVirsualAbnWorkhoursService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_abn_workhours
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="tt_virsual_abn_workhours")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/virsualabnworkhours/ttVirsualAbnWorkhours")
|
||||||
|
@Slf4j
|
||||||
|
public class TtVirsualAbnWorkhoursController extends JeecgController<TtVirsualAbnWorkhours, ITtVirsualAbnWorkhoursService> {
|
||||||
|
@Autowired
|
||||||
|
private ITtVirsualAbnWorkhoursService ttVirsualAbnWorkhoursService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param ttVirsualAbnWorkhours
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_abn_workhours-分页列表查询")
|
||||||
|
@ApiOperation(value="tt_virsual_abn_workhours-分页列表查询", notes="tt_virsual_abn_workhours-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<TtVirsualAbnWorkhours>> queryPageList(TtVirsualAbnWorkhours ttVirsualAbnWorkhours,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<TtVirsualAbnWorkhours> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualAbnWorkhours, req.getParameterMap());
|
||||||
|
Page<TtVirsualAbnWorkhours> page = new Page<TtVirsualAbnWorkhours>(pageNo, pageSize);
|
||||||
|
IPage<TtVirsualAbnWorkhours> pageList = ttVirsualAbnWorkhoursService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param ttVirsualAbnWorkhours
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_abn_workhours-添加")
|
||||||
|
@ApiOperation(value="tt_virsual_abn_workhours-添加", notes="tt_virsual_abn_workhours-添加")
|
||||||
|
//@RequiresPermissions("virsualabnworkhours:tt_virsual_abn_workhours:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody TtVirsualAbnWorkhours ttVirsualAbnWorkhours) {
|
||||||
|
ttVirsualAbnWorkhoursService.save(ttVirsualAbnWorkhours);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param ttVirsualAbnWorkhours
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_abn_workhours-编辑")
|
||||||
|
@ApiOperation(value="tt_virsual_abn_workhours-编辑", notes="tt_virsual_abn_workhours-编辑")
|
||||||
|
//@RequiresPermissions("virsualabnworkhours:tt_virsual_abn_workhours:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody TtVirsualAbnWorkhours ttVirsualAbnWorkhours) {
|
||||||
|
ttVirsualAbnWorkhoursService.updateById(ttVirsualAbnWorkhours);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_abn_workhours-通过id删除")
|
||||||
|
@ApiOperation(value="tt_virsual_abn_workhours-通过id删除", notes="tt_virsual_abn_workhours-通过id删除")
|
||||||
|
//@RequiresPermissions("virsualabnworkhours:tt_virsual_abn_workhours:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ttVirsualAbnWorkhoursService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_abn_workhours-批量删除")
|
||||||
|
@ApiOperation(value="tt_virsual_abn_workhours-批量删除", notes="tt_virsual_abn_workhours-批量删除")
|
||||||
|
//@RequiresPermissions("virsualabnworkhours:tt_virsual_abn_workhours:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.ttVirsualAbnWorkhoursService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_abn_workhours-通过id查询")
|
||||||
|
@ApiOperation(value="tt_virsual_abn_workhours-通过id查询", notes="tt_virsual_abn_workhours-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<TtVirsualAbnWorkhours> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
TtVirsualAbnWorkhours ttVirsualAbnWorkhours = ttVirsualAbnWorkhoursService.getById(id);
|
||||||
|
if(ttVirsualAbnWorkhours==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(ttVirsualAbnWorkhours);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param ttVirsualAbnWorkhours
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualabnworkhours:tt_virsual_abn_workhours:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, TtVirsualAbnWorkhours ttVirsualAbnWorkhours) {
|
||||||
|
return super.exportXls(request, ttVirsualAbnWorkhours, TtVirsualAbnWorkhours.class, "tt_virsual_abn_workhours");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualabnworkhours:tt_virsual_abn_workhours:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, TtVirsualAbnWorkhours.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualabnworkhours.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.demo.virsualabnworkhours.entity.TtVirsualAbnWorkhours;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_abn_workhours
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface TtVirsualAbnWorkhoursMapper extends BaseMapper<TtVirsualAbnWorkhours> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.demo.virsualabnworkhours.mapper.TtVirsualAbnWorkhoursMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualabnworkhours.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualabnworkhours.entity.TtVirsualAbnWorkhours;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_abn_workhours
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ITtVirsualAbnWorkhoursService extends IService<TtVirsualAbnWorkhours> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualabnworkhours.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualabnworkhours.entity.TtVirsualAbnWorkhours;
|
||||||
|
import org.jeecg.modules.demo.virsualabnworkhours.mapper.TtVirsualAbnWorkhoursMapper;
|
||||||
|
import org.jeecg.modules.demo.virsualabnworkhours.service.ITtVirsualAbnWorkhoursService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_abn_workhours
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TtVirsualAbnWorkhoursServiceImpl extends ServiceImpl<TtVirsualAbnWorkhoursMapper, TtVirsualAbnWorkhours> implements ITtVirsualAbnWorkhoursService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
destroyOnClose
|
||||||
|
:visible="visible">
|
||||||
|
<tt-virsual-abn-workhours-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-abn-workhours-form>
|
||||||
|
<div class="drawer-footer">
|
||||||
|
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||||
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualAbnWorkhoursForm from './TtVirsualAbnWorkhoursForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualAbnWorkhoursModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualAbnWorkhoursForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** Button按钮间距 */
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.drawer-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<tt-virsual-abn-workhours-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-abn-workhours-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualAbnWorkhoursForm from './TtVirsualAbnWorkhoursForm'
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualAbnWorkhoursModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualAbnWorkhoursForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:'',
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,178 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualachrate.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.demo.virsualachrate.entity.TtVirsualAchRate;
|
||||||
|
import org.jeecg.modules.demo.virsualachrate.service.ITtVirsualAchRateService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_ach_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="tt_virsual_ach_rate")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/virsualachrate/ttVirsualAchRate")
|
||||||
|
@Slf4j
|
||||||
|
public class TtVirsualAchRateController extends JeecgController<TtVirsualAchRate, ITtVirsualAchRateService> {
|
||||||
|
@Autowired
|
||||||
|
private ITtVirsualAchRateService ttVirsualAchRateService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param ttVirsualAchRate
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_ach_rate-分页列表查询")
|
||||||
|
@ApiOperation(value="tt_virsual_ach_rate-分页列表查询", notes="tt_virsual_ach_rate-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<TtVirsualAchRate>> queryPageList(TtVirsualAchRate ttVirsualAchRate,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<TtVirsualAchRate> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualAchRate, req.getParameterMap());
|
||||||
|
Page<TtVirsualAchRate> page = new Page<TtVirsualAchRate>(pageNo, pageSize);
|
||||||
|
IPage<TtVirsualAchRate> pageList = ttVirsualAchRateService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param ttVirsualAchRate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_ach_rate-添加")
|
||||||
|
@ApiOperation(value="tt_virsual_ach_rate-添加", notes="tt_virsual_ach_rate-添加")
|
||||||
|
//@RequiresPermissions("virsualachrate:tt_virsual_ach_rate:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody TtVirsualAchRate ttVirsualAchRate) {
|
||||||
|
ttVirsualAchRateService.save(ttVirsualAchRate);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param ttVirsualAchRate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_ach_rate-编辑")
|
||||||
|
@ApiOperation(value="tt_virsual_ach_rate-编辑", notes="tt_virsual_ach_rate-编辑")
|
||||||
|
//@RequiresPermissions("virsualachrate:tt_virsual_ach_rate:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody TtVirsualAchRate ttVirsualAchRate) {
|
||||||
|
ttVirsualAchRateService.updateById(ttVirsualAchRate);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_ach_rate-通过id删除")
|
||||||
|
@ApiOperation(value="tt_virsual_ach_rate-通过id删除", notes="tt_virsual_ach_rate-通过id删除")
|
||||||
|
//@RequiresPermissions("virsualachrate:tt_virsual_ach_rate:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ttVirsualAchRateService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_ach_rate-批量删除")
|
||||||
|
@ApiOperation(value="tt_virsual_ach_rate-批量删除", notes="tt_virsual_ach_rate-批量删除")
|
||||||
|
//@RequiresPermissions("virsualachrate:tt_virsual_ach_rate:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.ttVirsualAchRateService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_ach_rate-通过id查询")
|
||||||
|
@ApiOperation(value="tt_virsual_ach_rate-通过id查询", notes="tt_virsual_ach_rate-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<TtVirsualAchRate> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
TtVirsualAchRate ttVirsualAchRate = ttVirsualAchRateService.getById(id);
|
||||||
|
if(ttVirsualAchRate==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(ttVirsualAchRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param ttVirsualAchRate
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualachrate:tt_virsual_ach_rate:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, TtVirsualAchRate ttVirsualAchRate) {
|
||||||
|
return super.exportXls(request, ttVirsualAchRate, TtVirsualAchRate.class, "tt_virsual_ach_rate");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualachrate:tt_virsual_ach_rate:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, TtVirsualAchRate.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualachrate.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.demo.virsualachrate.entity.TtVirsualAchRate;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_ach_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface TtVirsualAchRateMapper extends BaseMapper<TtVirsualAchRate> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.demo.virsualachrate.mapper.TtVirsualAchRateMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualachrate.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualachrate.entity.TtVirsualAchRate;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_ach_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ITtVirsualAchRateService extends IService<TtVirsualAchRate> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualachrate.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualachrate.entity.TtVirsualAchRate;
|
||||||
|
import org.jeecg.modules.demo.virsualachrate.mapper.TtVirsualAchRateMapper;
|
||||||
|
import org.jeecg.modules.demo.virsualachrate.service.ITtVirsualAchRateService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_ach_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TtVirsualAchRateServiceImpl extends ServiceImpl<TtVirsualAchRateMapper, TtVirsualAchRate> implements ITtVirsualAchRateService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
destroyOnClose
|
||||||
|
:visible="visible">
|
||||||
|
<tt-virsual-ach-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-ach-rate-form>
|
||||||
|
<div class="drawer-footer">
|
||||||
|
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||||
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualAchRateForm from './TtVirsualAchRateForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualAchRateModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualAchRateForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** Button按钮间距 */
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.drawer-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<tt-virsual-ach-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-ach-rate-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualAchRateForm from './TtVirsualAchRateForm'
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualAchRateModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualAchRateForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:'',
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,225 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualoutput.controller;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.demo.inwhdata.entity.TtInWhData;
|
||||||
|
import org.jeecg.modules.demo.kanbanequiprate.entity.TtKanbanEquipRate;
|
||||||
|
import org.jeecg.modules.demo.virsualoutput.entity.TtVirsualOutput;
|
||||||
|
import org.jeecg.modules.demo.virsualoutput.service.ITtVirsualOutputService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_output
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="tt_virsual_output")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/virsualoutput/ttVirsualOutput")
|
||||||
|
@Slf4j
|
||||||
|
public class TtVirsualOutputController extends JeecgController<TtVirsualOutput, ITtVirsualOutputService> {
|
||||||
|
@Autowired
|
||||||
|
private ITtVirsualOutputService ttVirsualOutputService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param ttVirsualOutput
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_output-分页列表查询")
|
||||||
|
@ApiOperation(value="tt_virsual_output-分页列表查询", notes="tt_virsual_output-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<TtVirsualOutput>> queryPageList(TtVirsualOutput ttVirsualOutput,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<TtVirsualOutput> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualOutput, req.getParameterMap());
|
||||||
|
Page<TtVirsualOutput> page = new Page<TtVirsualOutput>(pageNo, pageSize);
|
||||||
|
IPage<TtVirsualOutput> pageList = ttVirsualOutputService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新总的看板1列表查询
|
||||||
|
*
|
||||||
|
* @param ttVirsualOutput
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_output-新总的看板1列表查询")
|
||||||
|
@ApiOperation(value="tt_virsual_output-新总的看板1列表查询", notes="tt_virsual_output-新总的看板1列表查询")
|
||||||
|
@GetMapping(value = "/queryList")
|
||||||
|
public Result<Map<String, Object>> queryList(TtVirsualOutput ttVirsualOutput) throws ParseException {
|
||||||
|
List<TtVirsualOutput> list1 = new ArrayList<>();
|
||||||
|
List<TtVirsualOutput> list2 = new ArrayList<>();
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
Random generator = new Random();
|
||||||
|
int randomIndex5 = 0;//随机数0到59 45
|
||||||
|
//获取当前日期前一天的日期
|
||||||
|
LocalDate localDate = LocalDate.now().minusDays(1);
|
||||||
|
for(int i=0;i<7;i++){
|
||||||
|
TtVirsualOutput virsualOutput = new TtVirsualOutput();
|
||||||
|
virsualOutput.setCompanyId(1);
|
||||||
|
virsualOutput.setDayName(sdf.parse(localDate.toString()));
|
||||||
|
randomIndex5 = generator.nextInt( 60 ) + 1;//随机数1到60 45
|
||||||
|
virsualOutput.setOutputQty(800 + (randomIndex5 * 9));
|
||||||
|
virsualOutput.setTypeId(1);//底座
|
||||||
|
localDate = localDate.minusDays(1);
|
||||||
|
list1.add(virsualOutput);
|
||||||
|
}
|
||||||
|
localDate = LocalDate.now().minusDays(1);
|
||||||
|
for(int i=0;i<7;i++){
|
||||||
|
TtVirsualOutput virsualOutput = new TtVirsualOutput();
|
||||||
|
virsualOutput.setCompanyId(1);
|
||||||
|
virsualOutput.setDayName(sdf.parse(localDate.toString()));
|
||||||
|
randomIndex5 = generator.nextInt( 60 ) + 1;//随机数1到60 45
|
||||||
|
virsualOutput.setOutputQty(800 + (randomIndex5 * 9));
|
||||||
|
virsualOutput.setTypeId(2);//底座
|
||||||
|
localDate = localDate.minusDays(1);
|
||||||
|
list2.add(virsualOutput);
|
||||||
|
}
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("dizuo", list1);
|
||||||
|
map.put("jiaosai", list2);
|
||||||
|
return Result.OK(map);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param ttVirsualOutput
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_output-添加")
|
||||||
|
@ApiOperation(value="tt_virsual_output-添加", notes="tt_virsual_output-添加")
|
||||||
|
//@RequiresPermissions("virsualoutput:tt_virsual_output:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody TtVirsualOutput ttVirsualOutput) {
|
||||||
|
ttVirsualOutputService.save(ttVirsualOutput);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param ttVirsualOutput
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_output-编辑")
|
||||||
|
@ApiOperation(value="tt_virsual_output-编辑", notes="tt_virsual_output-编辑")
|
||||||
|
//@RequiresPermissions("virsualoutput:tt_virsual_output:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody TtVirsualOutput ttVirsualOutput) {
|
||||||
|
ttVirsualOutputService.updateById(ttVirsualOutput);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_output-通过id删除")
|
||||||
|
@ApiOperation(value="tt_virsual_output-通过id删除", notes="tt_virsual_output-通过id删除")
|
||||||
|
//@RequiresPermissions("virsualoutput:tt_virsual_output:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ttVirsualOutputService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_output-批量删除")
|
||||||
|
@ApiOperation(value="tt_virsual_output-批量删除", notes="tt_virsual_output-批量删除")
|
||||||
|
//@RequiresPermissions("virsualoutput:tt_virsual_output:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.ttVirsualOutputService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_output-通过id查询")
|
||||||
|
@ApiOperation(value="tt_virsual_output-通过id查询", notes="tt_virsual_output-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<TtVirsualOutput> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
TtVirsualOutput ttVirsualOutput = ttVirsualOutputService.getById(id);
|
||||||
|
if(ttVirsualOutput==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(ttVirsualOutput);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param ttVirsualOutput
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualoutput:tt_virsual_output:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, TtVirsualOutput ttVirsualOutput) {
|
||||||
|
return super.exportXls(request, ttVirsualOutput, TtVirsualOutput.class, "tt_virsual_output");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualoutput:tt_virsual_output:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, TtVirsualOutput.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualoutput.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.demo.virsualoutput.entity.TtVirsualOutput;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_output
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface TtVirsualOutputMapper extends BaseMapper<TtVirsualOutput> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.demo.virsualoutput.mapper.TtVirsualOutputMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualoutput.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualoutput.entity.TtVirsualOutput;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_output
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ITtVirsualOutputService extends IService<TtVirsualOutput> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualoutput.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualoutput.entity.TtVirsualOutput;
|
||||||
|
import org.jeecg.modules.demo.virsualoutput.mapper.TtVirsualOutputMapper;
|
||||||
|
import org.jeecg.modules.demo.virsualoutput.service.ITtVirsualOutputService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_output
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TtVirsualOutputServiceImpl extends ServiceImpl<TtVirsualOutputMapper, TtVirsualOutput> implements ITtVirsualOutputService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
destroyOnClose
|
||||||
|
:visible="visible">
|
||||||
|
<tt-virsual-output-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-output-form>
|
||||||
|
<div class="drawer-footer">
|
||||||
|
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||||
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualOutputForm from './TtVirsualOutputForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualOutputModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualOutputForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** Button按钮间距 */
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.drawer-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<tt-virsual-output-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-output-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualOutputForm from './TtVirsualOutputForm'
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualOutputModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualOutputForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:'',
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,178 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualpassrate.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.demo.virsualpassrate.entity.TtVirsualPassRate;
|
||||||
|
import org.jeecg.modules.demo.virsualpassrate.service.ITtVirsualPassRateService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_pass_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="tt_virsual_pass_rate")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/virsualpassrate/ttVirsualPassRate")
|
||||||
|
@Slf4j
|
||||||
|
public class TtVirsualPassRateController extends JeecgController<TtVirsualPassRate, ITtVirsualPassRateService> {
|
||||||
|
@Autowired
|
||||||
|
private ITtVirsualPassRateService ttVirsualPassRateService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param ttVirsualPassRate
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_pass_rate-分页列表查询")
|
||||||
|
@ApiOperation(value="tt_virsual_pass_rate-分页列表查询", notes="tt_virsual_pass_rate-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<TtVirsualPassRate>> queryPageList(TtVirsualPassRate ttVirsualPassRate,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<TtVirsualPassRate> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualPassRate, req.getParameterMap());
|
||||||
|
Page<TtVirsualPassRate> page = new Page<TtVirsualPassRate>(pageNo, pageSize);
|
||||||
|
IPage<TtVirsualPassRate> pageList = ttVirsualPassRateService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param ttVirsualPassRate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_pass_rate-添加")
|
||||||
|
@ApiOperation(value="tt_virsual_pass_rate-添加", notes="tt_virsual_pass_rate-添加")
|
||||||
|
//@RequiresPermissions("virsualpassrate:tt_virsual_pass_rate:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody TtVirsualPassRate ttVirsualPassRate) {
|
||||||
|
ttVirsualPassRateService.save(ttVirsualPassRate);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param ttVirsualPassRate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_pass_rate-编辑")
|
||||||
|
@ApiOperation(value="tt_virsual_pass_rate-编辑", notes="tt_virsual_pass_rate-编辑")
|
||||||
|
//@RequiresPermissions("virsualpassrate:tt_virsual_pass_rate:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody TtVirsualPassRate ttVirsualPassRate) {
|
||||||
|
ttVirsualPassRateService.updateById(ttVirsualPassRate);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_pass_rate-通过id删除")
|
||||||
|
@ApiOperation(value="tt_virsual_pass_rate-通过id删除", notes="tt_virsual_pass_rate-通过id删除")
|
||||||
|
//@RequiresPermissions("virsualpassrate:tt_virsual_pass_rate:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ttVirsualPassRateService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_pass_rate-批量删除")
|
||||||
|
@ApiOperation(value="tt_virsual_pass_rate-批量删除", notes="tt_virsual_pass_rate-批量删除")
|
||||||
|
//@RequiresPermissions("virsualpassrate:tt_virsual_pass_rate:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.ttVirsualPassRateService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_pass_rate-通过id查询")
|
||||||
|
@ApiOperation(value="tt_virsual_pass_rate-通过id查询", notes="tt_virsual_pass_rate-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<TtVirsualPassRate> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
TtVirsualPassRate ttVirsualPassRate = ttVirsualPassRateService.getById(id);
|
||||||
|
if(ttVirsualPassRate==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(ttVirsualPassRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param ttVirsualPassRate
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualpassrate:tt_virsual_pass_rate:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, TtVirsualPassRate ttVirsualPassRate) {
|
||||||
|
return super.exportXls(request, ttVirsualPassRate, TtVirsualPassRate.class, "tt_virsual_pass_rate");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualpassrate:tt_virsual_pass_rate:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, TtVirsualPassRate.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualpassrate.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.demo.virsualpassrate.entity.TtVirsualPassRate;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_pass_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface TtVirsualPassRateMapper extends BaseMapper<TtVirsualPassRate> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.demo.virsualpassrate.mapper.TtVirsualPassRateMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualpassrate.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualpassrate.entity.TtVirsualPassRate;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_pass_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ITtVirsualPassRateService extends IService<TtVirsualPassRate> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualpassrate.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualpassrate.entity.TtVirsualPassRate;
|
||||||
|
import org.jeecg.modules.demo.virsualpassrate.mapper.TtVirsualPassRateMapper;
|
||||||
|
import org.jeecg.modules.demo.virsualpassrate.service.ITtVirsualPassRateService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_pass_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TtVirsualPassRateServiceImpl extends ServiceImpl<TtVirsualPassRateMapper, TtVirsualPassRate> implements ITtVirsualPassRateService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
destroyOnClose
|
||||||
|
:visible="visible">
|
||||||
|
<tt-virsual-pass-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-pass-rate-form>
|
||||||
|
<div class="drawer-footer">
|
||||||
|
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||||
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualPassRateForm from './TtVirsualPassRateForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualPassRateModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualPassRateForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** Button按钮间距 */
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.drawer-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<tt-virsual-pass-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-pass-rate-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualPassRateForm from './TtVirsualPassRateForm'
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualPassRateModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualPassRateForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:'',
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,178 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualrtpassRate.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.demo.virsualrtpassRate.entity.TtVirsualRtPassRate;
|
||||||
|
import org.jeecg.modules.demo.virsualrtpassRate.service.ITtVirsualRtPassRateService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_rt_pass_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="tt_virsual_rt_pass_rate")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/virsualrtpassRate/ttVirsualRtPassRate")
|
||||||
|
@Slf4j
|
||||||
|
public class TtVirsualRtPassRateController extends JeecgController<TtVirsualRtPassRate, ITtVirsualRtPassRateService> {
|
||||||
|
@Autowired
|
||||||
|
private ITtVirsualRtPassRateService ttVirsualRtPassRateService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param ttVirsualRtPassRate
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_rt_pass_rate-分页列表查询")
|
||||||
|
@ApiOperation(value="tt_virsual_rt_pass_rate-分页列表查询", notes="tt_virsual_rt_pass_rate-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<TtVirsualRtPassRate>> queryPageList(TtVirsualRtPassRate ttVirsualRtPassRate,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<TtVirsualRtPassRate> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualRtPassRate, req.getParameterMap());
|
||||||
|
Page<TtVirsualRtPassRate> page = new Page<TtVirsualRtPassRate>(pageNo, pageSize);
|
||||||
|
IPage<TtVirsualRtPassRate> pageList = ttVirsualRtPassRateService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param ttVirsualRtPassRate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_rt_pass_rate-添加")
|
||||||
|
@ApiOperation(value="tt_virsual_rt_pass_rate-添加", notes="tt_virsual_rt_pass_rate-添加")
|
||||||
|
//@RequiresPermissions("virsualrtpassRate:tt_virsual_rt_pass_rate:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody TtVirsualRtPassRate ttVirsualRtPassRate) {
|
||||||
|
ttVirsualRtPassRateService.save(ttVirsualRtPassRate);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param ttVirsualRtPassRate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_rt_pass_rate-编辑")
|
||||||
|
@ApiOperation(value="tt_virsual_rt_pass_rate-编辑", notes="tt_virsual_rt_pass_rate-编辑")
|
||||||
|
//@RequiresPermissions("virsualrtpassRate:tt_virsual_rt_pass_rate:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody TtVirsualRtPassRate ttVirsualRtPassRate) {
|
||||||
|
ttVirsualRtPassRateService.updateById(ttVirsualRtPassRate);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_rt_pass_rate-通过id删除")
|
||||||
|
@ApiOperation(value="tt_virsual_rt_pass_rate-通过id删除", notes="tt_virsual_rt_pass_rate-通过id删除")
|
||||||
|
//@RequiresPermissions("virsualrtpassRate:tt_virsual_rt_pass_rate:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ttVirsualRtPassRateService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_rt_pass_rate-批量删除")
|
||||||
|
@ApiOperation(value="tt_virsual_rt_pass_rate-批量删除", notes="tt_virsual_rt_pass_rate-批量删除")
|
||||||
|
//@RequiresPermissions("virsualrtpassRate:tt_virsual_rt_pass_rate:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.ttVirsualRtPassRateService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_rt_pass_rate-通过id查询")
|
||||||
|
@ApiOperation(value="tt_virsual_rt_pass_rate-通过id查询", notes="tt_virsual_rt_pass_rate-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<TtVirsualRtPassRate> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
TtVirsualRtPassRate ttVirsualRtPassRate = ttVirsualRtPassRateService.getById(id);
|
||||||
|
if(ttVirsualRtPassRate==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(ttVirsualRtPassRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param ttVirsualRtPassRate
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualrtpassRate:tt_virsual_rt_pass_rate:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, TtVirsualRtPassRate ttVirsualRtPassRate) {
|
||||||
|
return super.exportXls(request, ttVirsualRtPassRate, TtVirsualRtPassRate.class, "tt_virsual_rt_pass_rate");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualrtpassRate:tt_virsual_rt_pass_rate:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, TtVirsualRtPassRate.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualrtpassRate.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.demo.virsualrtpassRate.entity.TtVirsualRtPassRate;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_rt_pass_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface TtVirsualRtPassRateMapper extends BaseMapper<TtVirsualRtPassRate> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.demo.virsualrtpassRate.mapper.TtVirsualRtPassRateMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualrtpassRate.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualrtpassRate.entity.TtVirsualRtPassRate;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_rt_pass_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ITtVirsualRtPassRateService extends IService<TtVirsualRtPassRate> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualrtpassRate.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualrtpassRate.entity.TtVirsualRtPassRate;
|
||||||
|
import org.jeecg.modules.demo.virsualrtpassRate.mapper.TtVirsualRtPassRateMapper;
|
||||||
|
import org.jeecg.modules.demo.virsualrtpassRate.service.ITtVirsualRtPassRateService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_rt_pass_rate
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TtVirsualRtPassRateServiceImpl extends ServiceImpl<TtVirsualRtPassRateMapper, TtVirsualRtPassRate> implements ITtVirsualRtPassRateService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
destroyOnClose
|
||||||
|
:visible="visible">
|
||||||
|
<tt-virsual-rt-pass-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-rt-pass-rate-form>
|
||||||
|
<div class="drawer-footer">
|
||||||
|
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||||
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualRtPassRateForm from './TtVirsualRtPassRateForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualRtPassRateModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualRtPassRateForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** Button按钮间距 */
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.drawer-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<tt-virsual-rt-pass-rate-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-rt-pass-rate-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualRtPassRateForm from './TtVirsualRtPassRateForm'
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualRtPassRateModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualRtPassRateForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:'',
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,178 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualshipping.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.demo.virsualshipping.entity.TtVirsualShipping;
|
||||||
|
import org.jeecg.modules.demo.virsualshipping.service.ITtVirsualShippingService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_shipping
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="tt_virsual_shipping")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/virsualshipping/ttVirsualShipping")
|
||||||
|
@Slf4j
|
||||||
|
public class TtVirsualShippingController extends JeecgController<TtVirsualShipping, ITtVirsualShippingService> {
|
||||||
|
@Autowired
|
||||||
|
private ITtVirsualShippingService ttVirsualShippingService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param ttVirsualShipping
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_shipping-分页列表查询")
|
||||||
|
@ApiOperation(value="tt_virsual_shipping-分页列表查询", notes="tt_virsual_shipping-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<TtVirsualShipping>> queryPageList(TtVirsualShipping ttVirsualShipping,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<TtVirsualShipping> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualShipping, req.getParameterMap());
|
||||||
|
Page<TtVirsualShipping> page = new Page<TtVirsualShipping>(pageNo, pageSize);
|
||||||
|
IPage<TtVirsualShipping> pageList = ttVirsualShippingService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param ttVirsualShipping
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_shipping-添加")
|
||||||
|
@ApiOperation(value="tt_virsual_shipping-添加", notes="tt_virsual_shipping-添加")
|
||||||
|
//@RequiresPermissions("virsualshipping:tt_virsual_shipping:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody TtVirsualShipping ttVirsualShipping) {
|
||||||
|
ttVirsualShippingService.save(ttVirsualShipping);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param ttVirsualShipping
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_shipping-编辑")
|
||||||
|
@ApiOperation(value="tt_virsual_shipping-编辑", notes="tt_virsual_shipping-编辑")
|
||||||
|
//@RequiresPermissions("virsualshipping:tt_virsual_shipping:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody TtVirsualShipping ttVirsualShipping) {
|
||||||
|
ttVirsualShippingService.updateById(ttVirsualShipping);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_shipping-通过id删除")
|
||||||
|
@ApiOperation(value="tt_virsual_shipping-通过id删除", notes="tt_virsual_shipping-通过id删除")
|
||||||
|
//@RequiresPermissions("virsualshipping:tt_virsual_shipping:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ttVirsualShippingService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_shipping-批量删除")
|
||||||
|
@ApiOperation(value="tt_virsual_shipping-批量删除", notes="tt_virsual_shipping-批量删除")
|
||||||
|
//@RequiresPermissions("virsualshipping:tt_virsual_shipping:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.ttVirsualShippingService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_shipping-通过id查询")
|
||||||
|
@ApiOperation(value="tt_virsual_shipping-通过id查询", notes="tt_virsual_shipping-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<TtVirsualShipping> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
TtVirsualShipping ttVirsualShipping = ttVirsualShippingService.getById(id);
|
||||||
|
if(ttVirsualShipping==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(ttVirsualShipping);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param ttVirsualShipping
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualshipping:tt_virsual_shipping:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, TtVirsualShipping ttVirsualShipping) {
|
||||||
|
return super.exportXls(request, ttVirsualShipping, TtVirsualShipping.class, "tt_virsual_shipping");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualshipping:tt_virsual_shipping:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, TtVirsualShipping.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualshipping.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.demo.virsualshipping.entity.TtVirsualShipping;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_shipping
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface TtVirsualShippingMapper extends BaseMapper<TtVirsualShipping> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.demo.virsualshipping.mapper.TtVirsualShippingMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualshipping.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualshipping.entity.TtVirsualShipping;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_shipping
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ITtVirsualShippingService extends IService<TtVirsualShipping> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualshipping.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualshipping.entity.TtVirsualShipping;
|
||||||
|
import org.jeecg.modules.demo.virsualshipping.mapper.TtVirsualShippingMapper;
|
||||||
|
import org.jeecg.modules.demo.virsualshipping.service.ITtVirsualShippingService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_shipping
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TtVirsualShippingServiceImpl extends ServiceImpl<TtVirsualShippingMapper, TtVirsualShipping> implements ITtVirsualShippingService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
destroyOnClose
|
||||||
|
:visible="visible">
|
||||||
|
<tt-virsual-shipping-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-shipping-form>
|
||||||
|
<div class="drawer-footer">
|
||||||
|
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||||
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualShippingForm from './TtVirsualShippingForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualShippingModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualShippingForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** Button按钮间距 */
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.drawer-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<tt-virsual-shipping-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-shipping-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualShippingForm from './TtVirsualShippingForm'
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualShippingModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualShippingForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:'',
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,223 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualwostatus.controller;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.time.LocalDate;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.demo.virsualoutput.entity.TtVirsualOutput;
|
||||||
|
import org.jeecg.modules.demo.virsualwostatus.entity.TtVirsualWoStatus;
|
||||||
|
import org.jeecg.modules.demo.virsualwostatus.service.ITtVirsualWoStatusService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_wo_status
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="tt_virsual_wo_status")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/virsualwostatus/ttVirsualWoStatus")
|
||||||
|
@Slf4j
|
||||||
|
public class TtVirsualWoStatusController extends JeecgController<TtVirsualWoStatus, ITtVirsualWoStatusService> {
|
||||||
|
@Autowired
|
||||||
|
private ITtVirsualWoStatusService ttVirsualWoStatusService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param ttVirsualWoStatus
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_wo_status-分页列表查询")
|
||||||
|
@ApiOperation(value="tt_virsual_wo_status-分页列表查询", notes="tt_virsual_wo_status-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<TtVirsualWoStatus>> queryPageList(TtVirsualWoStatus ttVirsualWoStatus,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<TtVirsualWoStatus> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualWoStatus, req.getParameterMap());
|
||||||
|
Page<TtVirsualWoStatus> page = new Page<TtVirsualWoStatus>(pageNo, pageSize);
|
||||||
|
IPage<TtVirsualWoStatus> pageList = ttVirsualWoStatusService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新总的看板2列表查询
|
||||||
|
*
|
||||||
|
* @param ttVirsualWoStatus
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_wo_status-新总的看板2列表查询")
|
||||||
|
@ApiOperation(value="tt_virsual_wo_status-新总的看板2列表查询", notes="tt_virsual_wo_status-新总的看板2列表查询")
|
||||||
|
@GetMapping(value = "/queryList")
|
||||||
|
public Result<List<TtVirsualWoStatus>> queryList(TtVirsualWoStatus ttVirsualWoStatus) throws ParseException {
|
||||||
|
List<TtVirsualWoStatus> list = new ArrayList<>();
|
||||||
|
for(int i=1;i<6;i++){
|
||||||
|
TtVirsualWoStatus virsualWoStatus = new TtVirsualWoStatus();
|
||||||
|
virsualWoStatus.setCompanyId(1);
|
||||||
|
virsualWoStatus.setWoStatus("正常");
|
||||||
|
if(i == 1){
|
||||||
|
virsualWoStatus.setWoNo("D23020071");
|
||||||
|
virsualWoStatus.setPartNo("Q601-A");
|
||||||
|
virsualWoStatus.setPartName("V06615A");
|
||||||
|
}else if(i==2){
|
||||||
|
virsualWoStatus.setWoNo("D23020072");
|
||||||
|
virsualWoStatus.setPartNo("Q806-A");
|
||||||
|
virsualWoStatus.setPartName("产品名称");
|
||||||
|
}else if(i==3){
|
||||||
|
virsualWoStatus.setWoNo("D23020075");
|
||||||
|
virsualWoStatus.setPartNo("1012-T");
|
||||||
|
virsualWoStatus.setPartName("产品名称");
|
||||||
|
}else if(i==4){
|
||||||
|
virsualWoStatus.setWoNo("D23020080");
|
||||||
|
virsualWoStatus.setPartNo("807F-T");
|
||||||
|
virsualWoStatus.setPartName("产品名称");
|
||||||
|
}else if(i==5){
|
||||||
|
virsualWoStatus.setWoNo("D23020084");
|
||||||
|
virsualWoStatus.setPartNo("605F-A");
|
||||||
|
virsualWoStatus.setPartName("产品名称" + i);
|
||||||
|
virsualWoStatus.setWoStatus("超期");
|
||||||
|
}
|
||||||
|
//virsualWoStatus.setProgress(0.5);
|
||||||
|
list.add(virsualWoStatus);
|
||||||
|
}
|
||||||
|
return Result.OK(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param ttVirsualWoStatus
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_wo_status-添加")
|
||||||
|
@ApiOperation(value="tt_virsual_wo_status-添加", notes="tt_virsual_wo_status-添加")
|
||||||
|
//@RequiresPermissions("virsualwostatus:tt_virsual_wo_status:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody TtVirsualWoStatus ttVirsualWoStatus) {
|
||||||
|
ttVirsualWoStatusService.save(ttVirsualWoStatus);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param ttVirsualWoStatus
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_wo_status-编辑")
|
||||||
|
@ApiOperation(value="tt_virsual_wo_status-编辑", notes="tt_virsual_wo_status-编辑")
|
||||||
|
//@RequiresPermissions("virsualwostatus:tt_virsual_wo_status:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody TtVirsualWoStatus ttVirsualWoStatus) {
|
||||||
|
ttVirsualWoStatusService.updateById(ttVirsualWoStatus);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_wo_status-通过id删除")
|
||||||
|
@ApiOperation(value="tt_virsual_wo_status-通过id删除", notes="tt_virsual_wo_status-通过id删除")
|
||||||
|
//@RequiresPermissions("virsualwostatus:tt_virsual_wo_status:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ttVirsualWoStatusService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_wo_status-批量删除")
|
||||||
|
@ApiOperation(value="tt_virsual_wo_status-批量删除", notes="tt_virsual_wo_status-批量删除")
|
||||||
|
//@RequiresPermissions("virsualwostatus:tt_virsual_wo_status:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.ttVirsualWoStatusService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_wo_status-通过id查询")
|
||||||
|
@ApiOperation(value="tt_virsual_wo_status-通过id查询", notes="tt_virsual_wo_status-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<TtVirsualWoStatus> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
TtVirsualWoStatus ttVirsualWoStatus = ttVirsualWoStatusService.getById(id);
|
||||||
|
if(ttVirsualWoStatus==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(ttVirsualWoStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param ttVirsualWoStatus
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualwostatus:tt_virsual_wo_status:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, TtVirsualWoStatus ttVirsualWoStatus) {
|
||||||
|
return super.exportXls(request, ttVirsualWoStatus, TtVirsualWoStatus.class, "tt_virsual_wo_status");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualwostatus:tt_virsual_wo_status:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, TtVirsualWoStatus.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualwostatus.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.demo.virsualwostatus.entity.TtVirsualWoStatus;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_wo_status
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface TtVirsualWoStatusMapper extends BaseMapper<TtVirsualWoStatus> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.demo.virsualwostatus.mapper.TtVirsualWoStatusMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualwostatus.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualwostatus.entity.TtVirsualWoStatus;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_wo_status
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ITtVirsualWoStatusService extends IService<TtVirsualWoStatus> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualwostatus.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualwostatus.entity.TtVirsualWoStatus;
|
||||||
|
import org.jeecg.modules.demo.virsualwostatus.mapper.TtVirsualWoStatusMapper;
|
||||||
|
import org.jeecg.modules.demo.virsualwostatus.service.ITtVirsualWoStatusService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_wo_status
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TtVirsualWoStatusServiceImpl extends ServiceImpl<TtVirsualWoStatusMapper, TtVirsualWoStatus> implements ITtVirsualWoStatusService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
destroyOnClose
|
||||||
|
:visible="visible">
|
||||||
|
<tt-virsual-wo-status-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-wo-status-form>
|
||||||
|
<div class="drawer-footer">
|
||||||
|
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||||
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualWoStatusForm from './TtVirsualWoStatusForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualWoStatusModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualWoStatusForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** Button按钮间距 */
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.drawer-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<tt-virsual-wo-status-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-wo-status-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualWoStatusForm from './TtVirsualWoStatusForm'
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualWoStatusModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualWoStatusForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:'',
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -0,0 +1,178 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualwsstatus.controller;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLDecoder;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
import org.jeecg.modules.demo.virsualwsstatus.entity.TtVirsualWsStatus;
|
||||||
|
import org.jeecg.modules.demo.virsualwsstatus.service.ITtVirsualWsStatusService;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
|
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||||
|
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||||
|
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||||
|
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_ws_status
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="tt_virsual_ws_status")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/virsualwsstatus/ttVirsualWsStatus")
|
||||||
|
@Slf4j
|
||||||
|
public class TtVirsualWsStatusController extends JeecgController<TtVirsualWsStatus, ITtVirsualWsStatusService> {
|
||||||
|
@Autowired
|
||||||
|
private ITtVirsualWsStatusService ttVirsualWsStatusService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param ttVirsualWsStatus
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_ws_status-分页列表查询")
|
||||||
|
@ApiOperation(value="tt_virsual_ws_status-分页列表查询", notes="tt_virsual_ws_status-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<TtVirsualWsStatus>> queryPageList(TtVirsualWsStatus ttVirsualWsStatus,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<TtVirsualWsStatus> queryWrapper = QueryGenerator.initQueryWrapper(ttVirsualWsStatus, req.getParameterMap());
|
||||||
|
Page<TtVirsualWsStatus> page = new Page<TtVirsualWsStatus>(pageNo, pageSize);
|
||||||
|
IPage<TtVirsualWsStatus> pageList = ttVirsualWsStatusService.page(page, queryWrapper);
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param ttVirsualWsStatus
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_ws_status-添加")
|
||||||
|
@ApiOperation(value="tt_virsual_ws_status-添加", notes="tt_virsual_ws_status-添加")
|
||||||
|
//@RequiresPermissions("virsualwsstatus:tt_virsual_ws_status:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody TtVirsualWsStatus ttVirsualWsStatus) {
|
||||||
|
ttVirsualWsStatusService.save(ttVirsualWsStatus);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param ttVirsualWsStatus
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_ws_status-编辑")
|
||||||
|
@ApiOperation(value="tt_virsual_ws_status-编辑", notes="tt_virsual_ws_status-编辑")
|
||||||
|
//@RequiresPermissions("virsualwsstatus:tt_virsual_ws_status:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody TtVirsualWsStatus ttVirsualWsStatus) {
|
||||||
|
ttVirsualWsStatusService.updateById(ttVirsualWsStatus);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_ws_status-通过id删除")
|
||||||
|
@ApiOperation(value="tt_virsual_ws_status-通过id删除", notes="tt_virsual_ws_status-通过id删除")
|
||||||
|
//@RequiresPermissions("virsualwsstatus:tt_virsual_ws_status:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
ttVirsualWsStatusService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "tt_virsual_ws_status-批量删除")
|
||||||
|
@ApiOperation(value="tt_virsual_ws_status-批量删除", notes="tt_virsual_ws_status-批量删除")
|
||||||
|
//@RequiresPermissions("virsualwsstatus:tt_virsual_ws_status:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.ttVirsualWsStatusService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "tt_virsual_ws_status-通过id查询")
|
||||||
|
@ApiOperation(value="tt_virsual_ws_status-通过id查询", notes="tt_virsual_ws_status-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<TtVirsualWsStatus> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
TtVirsualWsStatus ttVirsualWsStatus = ttVirsualWsStatusService.getById(id);
|
||||||
|
if(ttVirsualWsStatus==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(ttVirsualWsStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param ttVirsualWsStatus
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualwsstatus:tt_virsual_ws_status:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, TtVirsualWsStatus ttVirsualWsStatus) {
|
||||||
|
return super.exportXls(request, ttVirsualWsStatus, TtVirsualWsStatus.class, "tt_virsual_ws_status");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@RequiresPermissions("virsualwsstatus:tt_virsual_ws_status:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, TtVirsualWsStatus.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualwsstatus.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.demo.virsualwsstatus.entity.TtVirsualWsStatus;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_ws_status
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface TtVirsualWsStatusMapper extends BaseMapper<TtVirsualWsStatus> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.jeecg.modules.demo.virsualwsstatus.mapper.TtVirsualWsStatusMapper">
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,14 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualwsstatus.service;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualwsstatus.entity.TtVirsualWsStatus;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_ws_status
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface ITtVirsualWsStatusService extends IService<TtVirsualWsStatus> {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package org.jeecg.modules.demo.virsualwsstatus.service.impl;
|
||||||
|
|
||||||
|
import org.jeecg.modules.demo.virsualwsstatus.entity.TtVirsualWsStatus;
|
||||||
|
import org.jeecg.modules.demo.virsualwsstatus.mapper.TtVirsualWsStatusMapper;
|
||||||
|
import org.jeecg.modules.demo.virsualwsstatus.service.ITtVirsualWsStatusService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: tt_virsual_ws_status
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2023-02-10
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class TtVirsualWsStatusServiceImpl extends ServiceImpl<TtVirsualWsStatusMapper, TtVirsualWsStatus> implements ITtVirsualWsStatusService {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
<template>
|
||||||
|
<a-drawer
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
placement="right"
|
||||||
|
:closable="false"
|
||||||
|
@close="close"
|
||||||
|
destroyOnClose
|
||||||
|
:visible="visible">
|
||||||
|
<tt-virsual-ws-status-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-virsual-ws-status-form>
|
||||||
|
<div class="drawer-footer">
|
||||||
|
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
|
||||||
|
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
|
||||||
|
</div>
|
||||||
|
</a-drawer>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualWsStatusForm from './TtVirsualWsStatusForm'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualWsStatusModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualWsStatusForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
/** Button按钮间距 */
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
float: right;
|
||||||
|
}
|
||||||
|
.drawer-footer{
|
||||||
|
position: absolute;
|
||||||
|
bottom: -8px;
|
||||||
|
width: 100%;
|
||||||
|
border-top: 1px solid #e8e8e8;
|
||||||
|
padding: 10px 16px;
|
||||||
|
text-align: right;
|
||||||
|
left: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 0 0 2px 2px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -0,0 +1,60 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<tt-virsual-ws-status-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-virsual-ws-status-form>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import TtVirsualWsStatusForm from './TtVirsualWsStatusForm'
|
||||||
|
export default {
|
||||||
|
name: 'TtVirsualWsStatusModal',
|
||||||
|
components: {
|
||||||
|
TtVirsualWsStatusForm
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:'',
|
||||||
|
width:800,
|
||||||
|
visible: false,
|
||||||
|
disableSubmit: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.add();
|
||||||
|
})
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.visible=true
|
||||||
|
this.$nextTick(()=>{
|
||||||
|
this.$refs.realForm.edit(record);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
this.$refs.realForm.submitForm();
|
||||||
|
},
|
||||||
|
submitCallback(){
|
||||||
|
this.$emit('ok');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in new issue