parent
4e52e04d91
commit
f6573bb833
@ -0,0 +1,185 @@
|
||||
package org.jeecg.modules.demo.dailyprocessrpt.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
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.dailyprocessrpt.entity.TtDailyProcessRpt;
|
||||
import org.jeecg.modules.demo.dailyprocessrpt.service.ITtDailyProcessRptService;
|
||||
|
||||
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_daily_process_rpt
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tt_daily_process_rpt")
|
||||
@RestController
|
||||
@RequestMapping("/dailyprocessrpt/ttDailyProcessRpt")
|
||||
@Slf4j
|
||||
public class TtDailyProcessRptController extends JeecgController<TtDailyProcessRpt, ITtDailyProcessRptService> {
|
||||
@Autowired
|
||||
private ITtDailyProcessRptService ttDailyProcessRptService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ttDailyProcessRpt
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_daily_process_rpt-分页列表查询")
|
||||
@ApiOperation(value="tt_daily_process_rpt-分页列表查询", notes="tt_daily_process_rpt-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TtDailyProcessRpt>> queryPageList(TtDailyProcessRpt ttDailyProcessRpt,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtDailyProcessRpt> queryWrapper = QueryGenerator.initQueryWrapper(ttDailyProcessRpt, req.getParameterMap());
|
||||
/*queryWrapper.eq("company_id", 1);
|
||||
queryWrapper.eq("type_id", 2);*/
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("create_date");
|
||||
list.add("create_time");
|
||||
queryWrapper.orderByAsc(list);
|
||||
Page<TtDailyProcessRpt> page = new Page<TtDailyProcessRpt>(pageNo, pageSize);
|
||||
IPage<TtDailyProcessRpt> pageList = ttDailyProcessRptService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ttDailyProcessRpt
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_daily_process_rpt-添加")
|
||||
@ApiOperation(value="tt_daily_process_rpt-添加", notes="tt_daily_process_rpt-添加")
|
||||
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TtDailyProcessRpt ttDailyProcessRpt) {
|
||||
ttDailyProcessRptService.save(ttDailyProcessRpt);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ttDailyProcessRpt
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_daily_process_rpt-编辑")
|
||||
@ApiOperation(value="tt_daily_process_rpt-编辑", notes="tt_daily_process_rpt-编辑")
|
||||
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TtDailyProcessRpt ttDailyProcessRpt) {
|
||||
ttDailyProcessRptService.updateById(ttDailyProcessRpt);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_daily_process_rpt-通过id删除")
|
||||
@ApiOperation(value="tt_daily_process_rpt-通过id删除", notes="tt_daily_process_rpt-通过id删除")
|
||||
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
ttDailyProcessRptService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_daily_process_rpt-批量删除")
|
||||
@ApiOperation(value="tt_daily_process_rpt-批量删除", notes="tt_daily_process_rpt-批量删除")
|
||||
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.ttDailyProcessRptService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_daily_process_rpt-通过id查询")
|
||||
@ApiOperation(value="tt_daily_process_rpt-通过id查询", notes="tt_daily_process_rpt-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TtDailyProcessRpt> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TtDailyProcessRpt ttDailyProcessRpt = ttDailyProcessRptService.getById(id);
|
||||
if(ttDailyProcessRpt==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(ttDailyProcessRpt);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param ttDailyProcessRpt
|
||||
*/
|
||||
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TtDailyProcessRpt ttDailyProcessRpt) {
|
||||
return super.exportXls(request, ttDailyProcessRpt, TtDailyProcessRpt.class, "tt_daily_process_rpt");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("dailyprocessrpt:tt_daily_process_rpt:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TtDailyProcessRpt.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.jeecg.modules.demo.dailyprocessrpt.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.dailyprocessrpt.entity.TtDailyProcessRpt;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tt_daily_process_rpt
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TtDailyProcessRptMapper extends BaseMapper<TtDailyProcessRpt> {
|
||||
|
||||
}
|
@ -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.dailyprocessrpt.mapper.TtDailyProcessRptMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,14 @@
|
||||
package org.jeecg.modules.demo.dailyprocessrpt.service;
|
||||
|
||||
import org.jeecg.modules.demo.dailyprocessrpt.entity.TtDailyProcessRpt;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tt_daily_process_rpt
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITtDailyProcessRptService extends IService<TtDailyProcessRpt> {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package org.jeecg.modules.demo.dailyprocessrpt.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.dailyprocessrpt.entity.TtDailyProcessRpt;
|
||||
import org.jeecg.modules.demo.dailyprocessrpt.mapper.TtDailyProcessRptMapper;
|
||||
import org.jeecg.modules.demo.dailyprocessrpt.service.ITtDailyProcessRptService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tt_daily_process_rpt
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TtDailyProcessRptServiceImpl extends ServiceImpl<TtDailyProcessRptMapper, TtDailyProcessRpt> implements ITtDailyProcessRptService {
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-daily-process-rpt-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-daily-process-rpt-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 TtDailyProcessRptForm from './TtDailyProcessRptForm'
|
||||
|
||||
export default {
|
||||
name: 'TtDailyProcessRptModal',
|
||||
components: {
|
||||
TtDailyProcessRptForm
|
||||
},
|
||||
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-daily-process-rpt-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-daily-process-rpt-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtDailyProcessRptForm from './TtDailyProcessRptForm'
|
||||
export default {
|
||||
name: 'TtDailyProcessRptModal',
|
||||
components: {
|
||||
TtDailyProcessRptForm
|
||||
},
|
||||
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,181 @@
|
||||
package org.jeecg.modules.demo.inwhdata.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.inwhdata.entity.TtInWhData;
|
||||
import org.jeecg.modules.demo.inwhdata.service.ITtInWhDataService;
|
||||
|
||||
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_in_wh_data
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="tt_in_wh_data")
|
||||
@RestController
|
||||
@RequestMapping("/inwhdata/ttInWhData")
|
||||
@Slf4j
|
||||
public class TtInWhDataController extends JeecgController<TtInWhData, ITtInWhDataService> {
|
||||
@Autowired
|
||||
private ITtInWhDataService ttInWhDataService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param ttInWhData
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_in_wh_data-分页列表查询")
|
||||
@ApiOperation(value="tt_in_wh_data-分页列表查询", notes="tt_in_wh_data-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<TtInWhData>> queryPageList(TtInWhData ttInWhData,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<TtInWhData> queryWrapper = QueryGenerator.initQueryWrapper(ttInWhData, req.getParameterMap());
|
||||
/*queryWrapper.eq("company_id", 1);
|
||||
queryWrapper.eq("type_id", 2);*/
|
||||
queryWrapper.orderByAsc("doc_no");
|
||||
Page<TtInWhData> page = new Page<TtInWhData>(pageNo, pageSize);
|
||||
IPage<TtInWhData> pageList = ttInWhDataService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param ttInWhData
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_in_wh_data-添加")
|
||||
@ApiOperation(value="tt_in_wh_data-添加", notes="tt_in_wh_data-添加")
|
||||
//@RequiresPermissions("inwhdata:tt_in_wh_data:add")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody TtInWhData ttInWhData) {
|
||||
ttInWhDataService.save(ttInWhData);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param ttInWhData
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_in_wh_data-编辑")
|
||||
@ApiOperation(value="tt_in_wh_data-编辑", notes="tt_in_wh_data-编辑")
|
||||
//@RequiresPermissions("inwhdata:tt_in_wh_data:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody TtInWhData ttInWhData) {
|
||||
ttInWhDataService.updateById(ttInWhData);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_in_wh_data-通过id删除")
|
||||
@ApiOperation(value="tt_in_wh_data-通过id删除", notes="tt_in_wh_data-通过id删除")
|
||||
//@RequiresPermissions("inwhdata:tt_in_wh_data:delete")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
ttInWhDataService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "tt_in_wh_data-批量删除")
|
||||
@ApiOperation(value="tt_in_wh_data-批量删除", notes="tt_in_wh_data-批量删除")
|
||||
//@RequiresPermissions("inwhdata:tt_in_wh_data:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.ttInWhDataService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "tt_in_wh_data-通过id查询")
|
||||
@ApiOperation(value="tt_in_wh_data-通过id查询", notes="tt_in_wh_data-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<TtInWhData> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
TtInWhData ttInWhData = ttInWhDataService.getById(id);
|
||||
if(ttInWhData==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(ttInWhData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param ttInWhData
|
||||
*/
|
||||
//@RequiresPermissions("inwhdata:tt_in_wh_data:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, TtInWhData ttInWhData) {
|
||||
return super.exportXls(request, ttInWhData, TtInWhData.class, "tt_in_wh_data");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
//@RequiresPermissions("inwhdata:tt_in_wh_data:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, TtInWhData.class);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package org.jeecg.modules.demo.inwhdata.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.inwhdata.entity.TtInWhData;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: tt_in_wh_data
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface TtInWhDataMapper extends BaseMapper<TtInWhData> {
|
||||
|
||||
}
|
@ -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.inwhdata.mapper.TtInWhDataMapper">
|
||||
|
||||
</mapper>
|
@ -0,0 +1,14 @@
|
||||
package org.jeecg.modules.demo.inwhdata.service;
|
||||
|
||||
import org.jeecg.modules.demo.inwhdata.entity.TtInWhData;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: tt_in_wh_data
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ITtInWhDataService extends IService<TtInWhData> {
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package org.jeecg.modules.demo.inwhdata.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.inwhdata.entity.TtInWhData;
|
||||
import org.jeecg.modules.demo.inwhdata.mapper.TtInWhDataMapper;
|
||||
import org.jeecg.modules.demo.inwhdata.service.ITtInWhDataService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: tt_in_wh_data
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-02-04
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class TtInWhDataServiceImpl extends ServiceImpl<TtInWhDataMapper, TtInWhData> implements ITtInWhDataService {
|
||||
|
||||
}
|
@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<a-drawer
|
||||
:title="title"
|
||||
:width="width"
|
||||
placement="right"
|
||||
:closable="false"
|
||||
@close="close"
|
||||
destroyOnClose
|
||||
:visible="visible">
|
||||
<tt-in-wh-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tt-in-wh-data-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 TtInWhDataForm from './TtInWhDataForm'
|
||||
|
||||
export default {
|
||||
name: 'TtInWhDataModal',
|
||||
components: {
|
||||
TtInWhDataForm
|
||||
},
|
||||
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-in-wh-data-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tt-in-wh-data-form>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import TtInWhDataForm from './TtInWhDataForm'
|
||||
export default {
|
||||
name: 'TtInWhDataModal',
|
||||
components: {
|
||||
TtInWhDataForm
|
||||
},
|
||||
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