17602169347 2 years ago
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,51 @@
package org.jeecg.modules.demo.virsualabnworkhours.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_virsual_abn_workhours
* @Author: jeecg-boot
* @Date: 2023-02-10
* @Version: V1.0
*/
@Data
@TableName("tt_virsual_abn_workhours")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_virsual_abn_workhours对象", description="tt_virsual_abn_workhours")
public class TtVirsualAbnWorkhours implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**异常名称,如:缺料,设备故障,品质异常等*/
@Excel(name = "异常名称,如:缺料,设备故障,品质异常等", width = 15)
@ApiModelProperty(value = "异常名称,如:缺料,设备故障,品质异常等")
private String abnName;
/**异常工时,单位分钟*/
@Excel(name = "异常工时,单位分钟", width = 15)
@ApiModelProperty(value = "异常工时,单位分钟")
private Integer abnHours;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

@ -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,183 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_virsual_abn_workhours')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-virsual-abn-workhours-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-abn-workhours-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualAbnWorkhoursModal from './modules/TtVirsualAbnWorkhoursModal'
export default {
name: 'TtVirsualAbnWorkhoursList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualAbnWorkhoursModal
},
data () {
return {
description: 'tt_virsual_abn_workhours',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'abnName'
},
{
title:'',
align:"center",
dataIndex: 'abnHours'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/virsualabnworkhours/ttVirsualAbnWorkhours/list",
delete: "/virsualabnworkhours/ttVirsualAbnWorkhours/delete",
deleteBatch: "/virsualabnworkhours/ttVirsualAbnWorkhours/deleteBatch",
exportXlsUrl: "/virsualabnworkhours/ttVirsualAbnWorkhours/exportXls",
importExcelUrl: "virsualabnworkhours/ttVirsualAbnWorkhours/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'abnName',text:''})
fieldList.push({type:'int',value:'abnHours',text:''})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/virsualabnworkhours
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021009041810320', NULL, 'tt_virsual_abn_workhours', '/virsualabnworkhours/ttVirsualAbnWorkhoursList', 'virsualabnworkhours/TtVirsualAbnWorkhoursList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-10 09:04:32', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009041820321', '2023021009041810320', 'tt_virsual_abn_workhours', NULL, NULL, 0, NULL, NULL, 2, 'virsualabnworkhours:tt_virsual_abn_workhours:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:04:32', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009041820322', '2023021009041810320', 'tt_virsual_abn_workhours', NULL, NULL, 0, NULL, NULL, 2, 'virsualabnworkhours:tt_virsual_abn_workhours:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:04:32', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009041820323', '2023021009041810320', 'tt_virsual_abn_workhours', NULL, NULL, 0, NULL, NULL, 2, 'virsualabnworkhours:tt_virsual_abn_workhours:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:04:32', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009041820324', '2023021009041810320', 'tt_virsual_abn_workhours', NULL, NULL, 0, NULL, NULL, 2, 'virsualabnworkhours:tt_virsual_abn_workhours:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:04:32', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009041820325', '2023021009041810320', 'excel_tt_virsual_abn_workhours', NULL, NULL, 0, NULL, NULL, 2, 'virsualabnworkhours:tt_virsual_abn_workhours:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:04:32', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009041820326', '2023021009041810320', 'excel_tt_virsual_abn_workhours', NULL, NULL, 0, NULL, NULL, 2, 'virsualabnworkhours:tt_virsual_abn_workhours:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:04:32', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,123 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="异常名称,如:缺料,设备故障,品质异常等" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="abnName">
<a-input v-model="model.abnName" placeholder="请输入异常名称,如:缺料,设备故障,品质异常等" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="异常工时,单位分钟" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="abnHours">
<a-input-number v-model="model.abnHours" placeholder="请输入异常工时,单位分钟" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtVirsualAbnWorkhoursForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
abnName: [
{ required: true, message: '!'},
],
abnHours: [
{ required: true, message: '!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/virsualabnworkhours/ttVirsualAbnWorkhours/add",
edit: "/virsualabnworkhours/ttVirsualAbnWorkhours/edit",
queryById: "/virsualabnworkhours/ttVirsualAbnWorkhours/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -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,61 @@
package org.jeecg.modules.demo.virsualachrate.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_virsual_ach_rate
* @Author: jeecg-boot
* @Date: 2023-02-10
* @Version: V1.0
*/
@Data
@TableName("tt_virsual_ach_rate")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_virsual_ach_rate对象", description="tt_virsual_ach_rate")
public class TtVirsualAchRate implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**日期名称*/
@Excel(name = "日期名称", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "日期名称")
private Date dayName;
/**工序名称*/
@Excel(name = "工序名称", width = 15)
@ApiModelProperty(value = "工序名称")
private String psName;
/**达成率*/
@Excel(name = "达成率", width = 15)
@ApiModelProperty(value = "达成率")
private Integer achRate;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

@ -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,198 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_virsual_ach_rate')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-virsual-ach-rate-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-ach-rate-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualAchRateModal from './modules/TtVirsualAchRateModal'
export default {
name: 'TtVirsualAchRateList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualAchRateModal
},
data () {
return {
description: 'tt_virsual_ach_rate',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'dayName',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'',
align:"center",
dataIndex: 'psName'
},
{
title:'',
align:"center",
dataIndex: 'achRate'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/virsualachrate/ttVirsualAchRate/list",
delete: "/virsualachrate/ttVirsualAchRate/delete",
deleteBatch: "/virsualachrate/ttVirsualAchRate/deleteBatch",
exportXlsUrl: "/virsualachrate/ttVirsualAchRate/exportXls",
importExcelUrl: "virsualachrate/ttVirsualAchRate/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'dayName',text:''})
fieldList.push({type:'string',value:'psName',text:''})
fieldList.push({type:'int',value:'achRate',text:''})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/virsualachrate
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021009034730020', NULL, 'tt_virsual_ach_rate', '/virsualachrate/ttVirsualAchRateList', 'virsualachrate/TtVirsualAchRateList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-10 09:03:02', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034730021', '2023021009034730020', 'tt_virsual_ach_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualachrate:tt_virsual_ach_rate:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:02', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034730022', '2023021009034730020', 'tt_virsual_ach_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualachrate:tt_virsual_ach_rate:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:02', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034730023', '2023021009034730020', 'tt_virsual_ach_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualachrate:tt_virsual_ach_rate:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:02', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034730024', '2023021009034730020', 'tt_virsual_ach_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualachrate:tt_virsual_ach_rate:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:02', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034730025', '2023021009034730020', 'excel_tt_virsual_ach_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualachrate:tt_virsual_ach_rate:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:02', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034730026', '2023021009034730020', 'excel_tt_virsual_ach_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualachrate:tt_virsual_ach_rate:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:02', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,136 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="日期名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dayName">
<j-date placeholder="请选择日期名称" v-model="model.dayName" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工序名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="psName">
<a-input v-model="model.psName" placeholder="请输入工序名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="达成率" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="achRate">
<a-input-number v-model="model.achRate" placeholder="请输入达成率" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtVirsualAchRateForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
dayName: [
{ required: true, message: '!'},
],
achRate: [
{ required: true, message: '!'},
],
typeId: [
{ required: true, message: 'id12!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/virsualachrate/ttVirsualAchRate/add",
edit: "/virsualachrate/ttVirsualAchRate/edit",
queryById: "/virsualachrate/ttVirsualAchRate/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -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,57 @@
package org.jeecg.modules.demo.virsualoutput.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_virsual_output
* @Author: jeecg-boot
* @Date: 2023-02-10
* @Version: V1.0
*/
@Data
@TableName("tt_virsual_output")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_virsual_output对象", description="tt_virsual_output")
public class TtVirsualOutput implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**日期名称*/
@Excel(name = "日期名称", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "日期名称")
private Date dayName;
/**产出数量*/
@Excel(name = "产出数量", width = 15)
@ApiModelProperty(value = "产出数量")
private Integer outputQty;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

@ -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,192 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_virsual_output')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-virsual-output-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-output-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualOutputModal from './modules/TtVirsualOutputModal'
export default {
name: 'TtVirsualOutputList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualOutputModal
},
data () {
return {
description: 'tt_virsual_output',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'dayName',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'',
align:"center",
dataIndex: 'outputQty'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/virsualoutput/ttVirsualOutput/list",
delete: "/virsualoutput/ttVirsualOutput/delete",
deleteBatch: "/virsualoutput/ttVirsualOutput/deleteBatch",
exportXlsUrl: "/virsualoutput/ttVirsualOutput/exportXls",
importExcelUrl: "virsualoutput/ttVirsualOutput/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'dayName',text:''})
fieldList.push({type:'int',value:'outputQty',text:''})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/virsualoutput
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021009036630200', NULL, 'tt_virsual_output', '/virsualoutput/ttVirsualOutputList', 'virsualoutput/TtVirsualOutputList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-10 09:03:20', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036630201', '2023021009036630200', 'tt_virsual_output', NULL, NULL, 0, NULL, NULL, 2, 'virsualoutput:tt_virsual_output:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:20', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036630202', '2023021009036630200', 'tt_virsual_output', NULL, NULL, 0, NULL, NULL, 2, 'virsualoutput:tt_virsual_output:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:20', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036630203', '2023021009036630200', 'tt_virsual_output', NULL, NULL, 0, NULL, NULL, 2, 'virsualoutput:tt_virsual_output:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:20', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036630204', '2023021009036630200', 'tt_virsual_output', NULL, NULL, 0, NULL, NULL, 2, 'virsualoutput:tt_virsual_output:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:20', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036630205', '2023021009036630200', 'excel_tt_virsual_output', NULL, NULL, 0, NULL, NULL, 2, 'virsualoutput:tt_virsual_output:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:20', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036630206', '2023021009036630200', 'excel_tt_virsual_output', NULL, NULL, 0, NULL, NULL, 2, 'virsualoutput:tt_virsual_output:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:20', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,131 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="日期名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dayName">
<j-date placeholder="请选择日期名称" v-model="model.dayName" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产出数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="outputQty">
<a-input-number v-model="model.outputQty" placeholder="请输入产出数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtVirsualOutputForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
dayName: [
{ required: true, message: '!'},
],
outputQty: [
{ required: true, message: '!'},
],
typeId: [
{ required: true, message: 'id12!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/virsualoutput/ttVirsualOutput/add",
edit: "/virsualoutput/ttVirsualOutput/edit",
queryById: "/virsualoutput/ttVirsualOutput/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -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,57 @@
package org.jeecg.modules.demo.virsualpassrate.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_virsual_pass_rate
* @Author: jeecg-boot
* @Date: 2023-02-10
* @Version: V1.0
*/
@Data
@TableName("tt_virsual_pass_rate")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_virsual_pass_rate对象", description="tt_virsual_pass_rate")
public class TtVirsualPassRate implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**日期名称*/
@Excel(name = "日期名称", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "日期名称")
private Date dayName;
/**合格率*/
@Excel(name = "合格率", width = 15)
@ApiModelProperty(value = "合格率")
private Integer passRate;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

@ -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,192 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_virsual_pass_rate')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-virsual-pass-rate-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-pass-rate-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualPassRateModal from './modules/TtVirsualPassRateModal'
export default {
name: 'TtVirsualPassRateList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualPassRateModal
},
data () {
return {
description: 'tt_virsual_pass_rate',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'dayName',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'',
align:"center",
dataIndex: 'passRate'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/virsualpassrate/ttVirsualPassRate/list",
delete: "/virsualpassrate/ttVirsualPassRate/delete",
deleteBatch: "/virsualpassrate/ttVirsualPassRate/deleteBatch",
exportXlsUrl: "/virsualpassrate/ttVirsualPassRate/exportXls",
importExcelUrl: "virsualpassrate/ttVirsualPassRate/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'dayName',text:''})
fieldList.push({type:'int',value:'passRate',text:''})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/virsualpassrate
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021009036050350', NULL, 'tt_virsual_pass_rate', '/virsualpassrate/ttVirsualPassRateList', 'virsualpassrate/TtVirsualPassRateList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-10 09:03:35', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036050351', '2023021009036050350', 'tt_virsual_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualpassrate:tt_virsual_pass_rate:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:35', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036050352', '2023021009036050350', 'tt_virsual_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualpassrate:tt_virsual_pass_rate:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:35', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036050353', '2023021009036050350', 'tt_virsual_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualpassrate:tt_virsual_pass_rate:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:35', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036050354', '2023021009036050350', 'tt_virsual_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualpassrate:tt_virsual_pass_rate:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:35', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036050355', '2023021009036050350', 'excel_tt_virsual_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualpassrate:tt_virsual_pass_rate:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:35', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009036050356', '2023021009036050350', 'excel_tt_virsual_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualpassrate:tt_virsual_pass_rate:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:35', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,131 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="日期名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dayName">
<j-date placeholder="请选择日期名称" v-model="model.dayName" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="合格率" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="passRate">
<a-input-number v-model="model.passRate" placeholder="请输入合格率" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtVirsualPassRateForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
dayName: [
{ required: true, message: '!'},
],
passRate: [
{ required: true, message: '!'},
],
typeId: [
{ required: true, message: 'id12!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/virsualpassrate/ttVirsualPassRate/add",
edit: "/virsualpassrate/ttVirsualPassRate/edit",
queryById: "/virsualpassrate/ttVirsualPassRate/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -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,51 @@
package org.jeecg.modules.demo.virsualrtpassRate.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_virsual_rt_pass_rate
* @Author: jeecg-boot
* @Date: 2023-02-10
* @Version: V1.0
*/
@Data
@TableName("tt_virsual_rt_pass_rate")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_virsual_rt_pass_rate对象", description="tt_virsual_rt_pass_rate")
public class TtVirsualRtPassRate implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**合格率*/
@Excel(name = "合格率", width = 15)
@ApiModelProperty(value = "合格率")
private Integer passRate;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

@ -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,183 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_virsual_rt_pass_rate')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-virsual-rt-pass-rate-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-rt-pass-rate-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualRtPassRateModal from './modules/TtVirsualRtPassRateModal'
export default {
name: 'TtVirsualRtPassRateList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualRtPassRateModal
},
data () {
return {
description: 'tt_virsual_rt_pass_rate',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'passRate'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/virsualrtpassRate/ttVirsualRtPassRate/list",
delete: "/virsualrtpassRate/ttVirsualRtPassRate/delete",
deleteBatch: "/virsualrtpassRate/ttVirsualRtPassRate/deleteBatch",
exportXlsUrl: "/virsualrtpassRate/ttVirsualRtPassRate/exportXls",
importExcelUrl: "virsualrtpassRate/ttVirsualRtPassRate/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'int',value:'passRate',text:''})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/virsualrtpassRate
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021009034100550', NULL, 'tt_virsual_rt_pass_rate', '/virsualrtpassRate/ttVirsualRtPassRateList', 'virsualrtpassRate/TtVirsualRtPassRateList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-10 09:03:55', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034100551', '2023021009034100550', 'tt_virsual_rt_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualrtpassRate:tt_virsual_rt_pass_rate:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:55', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034100552', '2023021009034100550', 'tt_virsual_rt_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualrtpassRate:tt_virsual_rt_pass_rate:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:55', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034100553', '2023021009034100550', 'tt_virsual_rt_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualrtpassRate:tt_virsual_rt_pass_rate:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:55', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034100554', '2023021009034100550', 'tt_virsual_rt_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualrtpassRate:tt_virsual_rt_pass_rate:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:55', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034100555', '2023021009034100550', 'excel_tt_virsual_rt_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualrtpassRate:tt_virsual_rt_pass_rate:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:55', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009034100556', '2023021009034100550', 'excel_tt_virsual_rt_pass_rate', NULL, NULL, 0, NULL, NULL, 2, 'virsualrtpassRate:tt_virsual_rt_pass_rate:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:03:55', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,123 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="合格率" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="passRate">
<a-input-number v-model="model.passRate" placeholder="请输入合格率" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtVirsualRtPassRateForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
passRate: [
{ required: true, message: '!'},
],
typeId: [
{ required: true, message: 'id12!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/virsualrtpassRate/ttVirsualRtPassRate/add",
edit: "/virsualrtpassRate/ttVirsualRtPassRate/edit",
queryById: "/virsualrtpassRate/ttVirsualRtPassRate/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -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,57 @@
package org.jeecg.modules.demo.virsualshipping.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_virsual_shipping
* @Author: jeecg-boot
* @Date: 2023-02-10
* @Version: V1.0
*/
@Data
@TableName("tt_virsual_shipping")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_virsual_shipping对象", description="tt_virsual_shipping")
public class TtVirsualShipping implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**日期名称*/
@Excel(name = "日期名称", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "日期名称")
private Date dayName;
/**出货数量*/
@Excel(name = "出货数量", width = 15)
@ApiModelProperty(value = "出货数量")
private Integer shippingQty;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

@ -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,192 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_virsual_shipping')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-virsual-shipping-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-shipping-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualShippingModal from './modules/TtVirsualShippingModal'
export default {
name: 'TtVirsualShippingList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualShippingModal
},
data () {
return {
description: 'tt_virsual_shipping',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'dayName',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'',
align:"center",
dataIndex: 'shippingQty'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/virsualshipping/ttVirsualShipping/list",
delete: "/virsualshipping/ttVirsualShipping/delete",
deleteBatch: "/virsualshipping/ttVirsualShipping/deleteBatch",
exportXlsUrl: "/virsualshipping/ttVirsualShipping/exportXls",
importExcelUrl: "virsualshipping/ttVirsualShipping/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'date',value:'dayName',text:''})
fieldList.push({type:'int',value:'shippingQty',text:''})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/virsualshipping
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021009028990110', NULL, 'tt_virsual_shipping', '/virsualshipping/ttVirsualShippingList', 'virsualshipping/TtVirsualShippingList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-10 09:02:11', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009028990111', '2023021009028990110', 'tt_virsual_shipping', NULL, NULL, 0, NULL, NULL, 2, 'virsualshipping:tt_virsual_shipping:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:11', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009028990112', '2023021009028990110', 'tt_virsual_shipping', NULL, NULL, 0, NULL, NULL, 2, 'virsualshipping:tt_virsual_shipping:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:11', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009028990113', '2023021009028990110', 'tt_virsual_shipping', NULL, NULL, 0, NULL, NULL, 2, 'virsualshipping:tt_virsual_shipping:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:11', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009028990114', '2023021009028990110', 'tt_virsual_shipping', NULL, NULL, 0, NULL, NULL, 2, 'virsualshipping:tt_virsual_shipping:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:11', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009028990115', '2023021009028990110', 'excel_tt_virsual_shipping', NULL, NULL, 0, NULL, NULL, 2, 'virsualshipping:tt_virsual_shipping:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:11', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009028990116', '2023021009028990110', 'excel_tt_virsual_shipping', NULL, NULL, 0, NULL, NULL, 2, 'virsualshipping:tt_virsual_shipping:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:11', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,131 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="日期名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dayName">
<j-date placeholder="请选择日期名称" v-model="model.dayName" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="出货数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="shippingQty">
<a-input-number v-model="model.shippingQty" placeholder="请输入出货数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtVirsualShippingForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
dayName: [
{ required: true, message: '!'},
],
shippingQty: [
{ required: true, message: '!'},
],
typeId: [
{ required: true, message: 'id12!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/virsualshipping/ttVirsualShipping/add",
edit: "/virsualshipping/ttVirsualShipping/edit",
queryById: "/virsualshipping/ttVirsualShipping/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -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,67 @@
package org.jeecg.modules.demo.virsualwostatus.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_virsual_wo_status
* @Author: jeecg-boot
* @Date: 2023-02-10
* @Version: V1.0
*/
@Data
@TableName("tt_virsual_wo_status")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_virsual_wo_status对象", description="tt_virsual_wo_status")
public class TtVirsualWoStatus implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**工单*/
@Excel(name = "工单", width = 15)
@ApiModelProperty(value = "工单")
private String woNo;
/**产品代号*/
@Excel(name = "产品代号", width = 15)
@ApiModelProperty(value = "产品代号")
private String partNo;
/**产品名称*/
@Excel(name = "产品名称", width = 15)
@ApiModelProperty(value = "产品名称")
private String partName;
/**进度带1位小数点*/
@Excel(name = "进度带1位小数点", width = 15)
@ApiModelProperty(value = "进度带1位小数点")
private BigDecimal progress;
/**状态*/
@Excel(name = "状态", width = 15)
@ApiModelProperty(value = "状态")
private String woStatus;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

@ -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,207 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_virsual_wo_status')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-virsual-wo-status-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-wo-status-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualWoStatusModal from './modules/TtVirsualWoStatusModal'
export default {
name: 'TtVirsualWoStatusList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualWoStatusModal
},
data () {
return {
description: 'tt_virsual_wo_status',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'woNo'
},
{
title:'',
align:"center",
dataIndex: 'partNo'
},
{
title:'',
align:"center",
dataIndex: 'partName'
},
{
title:'1',
align:"center",
dataIndex: 'progress'
},
{
title:'',
align:"center",
dataIndex: 'woStatus'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/virsualwostatus/ttVirsualWoStatus/list",
delete: "/virsualwostatus/ttVirsualWoStatus/delete",
deleteBatch: "/virsualwostatus/ttVirsualWoStatus/deleteBatch",
exportXlsUrl: "/virsualwostatus/ttVirsualWoStatus/exportXls",
importExcelUrl: "virsualwostatus/ttVirsualWoStatus/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'woNo',text:''})
fieldList.push({type:'string',value:'partNo',text:''})
fieldList.push({type:'string',value:'partName',text:''})
fieldList.push({type:'number',value:'progress',text:'1'})
fieldList.push({type:'string',value:'woStatus',text:''})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/virsualwostatus
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('2023021009026720290', NULL, 'tt_virsual_wo_status', '/virsualwostatus/ttVirsualWoStatusList', 'virsualwostatus/TtVirsualWoStatusList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-10 09:02:29', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009026720291', '2023021009026720290', 'tt_virsual_wo_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwostatus:tt_virsual_wo_status:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:29', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009026720292', '2023021009026720290', 'tt_virsual_wo_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwostatus:tt_virsual_wo_status:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:29', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009026720293', '2023021009026720290', 'tt_virsual_wo_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwostatus:tt_virsual_wo_status:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:29', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009026720294', '2023021009026720290', 'tt_virsual_wo_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwostatus:tt_virsual_wo_status:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:29', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009026720295', '2023021009026720290', 'excel_tt_virsual_wo_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwostatus:tt_virsual_wo_status:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:29', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('2023021009026720296', '2023021009026720290', 'excel_tt_virsual_wo_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwostatus:tt_virsual_wo_status:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:29', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,143 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="工单" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="woNo">
<a-input v-model="model.woNo" placeholder="请输入工单" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品代号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partNo">
<a-input v-model="model.partNo" placeholder="请输入产品代号" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="partName">
<a-input v-model="model.partName" placeholder="请输入产品名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="进度带1位小数点" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="progress">
<a-input-number v-model="model.progress" placeholder="请输入进度带1位小数点" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="状态" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="woStatus">
<a-input v-model="model.woStatus" placeholder="请输入状态" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtVirsualWoStatusForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
woNo: [
{ required: true, message: '!'},
],
typeId: [
{ required: true, message: 'id12!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/virsualwostatus/ttVirsualWoStatus/add",
edit: "/virsualwostatus/ttVirsualWoStatus/edit",
queryById: "/virsualwostatus/ttVirsualWoStatus/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -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,59 @@
package org.jeecg.modules.demo.virsualwsstatus.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* @Description: tt_virsual_ws_status
* @Author: jeecg-boot
* @Date: 2023-02-10
* @Version: V1.0
*/
@Data
@TableName("tt_virsual_ws_status")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="tt_virsual_ws_status对象", description="tt_virsual_ws_status")
public class TtVirsualWsStatus implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private Integer id;
/**车间名称*/
@Excel(name = "车间名称", width = 15)
@ApiModelProperty(value = "车间名称")
private String wsName;
/**计划数量*/
@Excel(name = "计划数量", width = 15)
@ApiModelProperty(value = "计划数量")
private Integer planQty;
/**实际数量*/
@Excel(name = "实际数量", width = 15)
@ApiModelProperty(value = "实际数量")
private Integer actQty;
/**产品类型id1表示底座2表示胶塞*/
@Excel(name = "产品类型id1表示底座2表示胶塞", width = 15)
@ApiModelProperty(value = "产品类型id1表示底座2表示胶塞")
private Integer typeId;
/**公司id, 1表示电气元器件2表示轨道扣件*/
@Excel(name = "公司id, 1表示电气元器件2表示轨道扣件", width = 15)
@ApiModelProperty(value = "公司id, 1表示电气元器件2表示轨道扣件")
private Integer companyId;
}

@ -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,195 @@
<template>
<a-card :bordered="false">
<!-- -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
</a-row>
</a-form>
</div>
<!-- -END -->
<!-- -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus"></a-button>
<a-button type="primary" icon="download" @click="handleExportXls('tt_virsual_ws_status')"></a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import"></a-button>
</a-upload>
<!-- -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/></a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected"></a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text,record">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;"></span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)"></a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link"> <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)"></a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a></a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<tt-virsual-ws-status-modal ref="modalForm" @ok="modalFormOk"></tt-virsual-ws-status-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import TtVirsualWsStatusModal from './modules/TtVirsualWsStatusModal'
export default {
name: 'TtVirsualWsStatusList',
mixins:[JeecgListMixin, mixinDevice],
components: {
TtVirsualWsStatusModal
},
data () {
return {
description: 'tt_virsual_ws_status',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'',
align:"center",
dataIndex: 'wsName'
},
{
title:'',
align:"center",
dataIndex: 'planQty'
},
{
title:'',
align:"center",
dataIndex: 'actQty'
},
{
title:'id12',
align:"center",
dataIndex: 'typeId'
},
{
title:'id, 12',
align:"center",
dataIndex: 'companyId'
},
{
title: '',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/virsualwsstatus/ttVirsualWsStatus/list",
delete: "/virsualwsstatus/ttVirsualWsStatus/delete",
deleteBatch: "/virsualwsstatus/ttVirsualWsStatus/deleteBatch",
exportXlsUrl: "/virsualwsstatus/ttVirsualWsStatus/exportXls",
importExcelUrl: "virsualwsstatus/ttVirsualWsStatus/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'wsName',text:''})
fieldList.push({type:'int',value:'planQty',text:''})
fieldList.push({type:'int',value:'actQty',text:''})
fieldList.push({type:'int',value:'typeId',text:'id12'})
fieldList.push({type:'int',value:'companyId',text:'id, 12'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -0,0 +1,26 @@
-- views/virsualwsstatus
-- sqlcomponent
INSERT INTO sys_permission(id, parent_id, name, url, component, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_route, is_leaf, keep_alive, hidden, hide_tab, description, status, del_flag, rule_flag, create_by, create_time, update_by, update_time, internal_or_external)
VALUES ('202302100902790460', NULL, 'tt_virsual_ws_status', '/virsualwsstatus/ttVirsualWsStatusList', 'virsualwsstatus/TtVirsualWsStatusList', NULL, NULL, 0, NULL, '1', 0.00, 0, NULL, 1, 0, 0, 0, 0, NULL, '1', 0, 0, 'admin', '2023-02-10 09:02:46', NULL, NULL, 0);
-- sql
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('202302100902790461', '202302100902790460', 'tt_virsual_ws_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwsstatus:tt_virsual_ws_status:add', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:46', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('202302100902790462', '202302100902790460', 'tt_virsual_ws_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwsstatus:tt_virsual_ws_status:edit', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:46', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('202302100902790463', '202302100902790460', 'tt_virsual_ws_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwsstatus:tt_virsual_ws_status:delete', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:46', NULL, NULL, 0, 0, '1', 0);
--
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('202302100902790464', '202302100902790460', 'tt_virsual_ws_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwsstatus:tt_virsual_ws_status:deleteBatch', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:46', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('202302100902790465', '202302100902790460', 'excel_tt_virsual_ws_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwsstatus:tt_virsual_ws_status:exportXls', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:46', NULL, NULL, 0, 0, '1', 0);
-- excel
INSERT INTO sys_permission(id, parent_id, name, url, component, is_route, component_name, redirect, menu_type, perms, perms_type, sort_no, always_show, icon, is_leaf, keep_alive, hidden, hide_tab, description, create_by, create_time, update_by, update_time, del_flag, rule_flag, status, internal_or_external)
VALUES ('202302100902790466', '202302100902790460', 'excel_tt_virsual_ws_status', NULL, NULL, 0, NULL, NULL, 2, 'virsualwsstatus:tt_virsual_ws_status:importExcel', '1', NULL, 0, NULL, 1, 0, 0, 0, NULL, 'admin', '2023-02-10 09:02:46', NULL, NULL, 0, 0, '1', 0);

@ -0,0 +1,139 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row>
<a-col :span="24">
<a-form-model-item label="车间名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="wsName">
<a-input v-model="model.wsName" placeholder="请输入车间名称" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="计划数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="planQty">
<a-input-number v-model="model.planQty" placeholder="请输入计划数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="实际数量" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="actQty">
<a-input-number v-model="model.actQty" placeholder="请输入实际数量" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="产品类型id1表示底座2表示胶塞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="typeId">
<a-input-number v-model="model.typeId" placeholder="请输入产品类型id1表示底座2表示胶塞" style="width: 100%" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="公司id, 1表示电气元器件2表示轨道扣件" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyId">
<a-input-number v-model="model.companyId" placeholder="请输入公司id, 1表示电气元器件2表示轨道扣件" style="width: 100%" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'TtVirsualWsStatusForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
wsName: [
{ required: true, message: '!'},
],
planQty: [
{ required: true, message: '!'},
],
actQty: [
{ required: true, message: '!'},
],
typeId: [
{ required: true, message: 'id12!'},
],
companyId: [
{ required: true, message: 'id, 12!'},
],
},
url: {
add: "/virsualwsstatus/ttVirsualWsStatus/add",
edit: "/virsualwsstatus/ttVirsualWsStatus/edit",
queryById: "/virsualwsstatus/ttVirsualWsStatus/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
//备份model原始值
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
}
}
</script>

@ -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…
Cancel
Save