喻忠伟 2 years ago
commit 11ef9762ab
  1. 2
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  2. 3
      ant-design-vue-jeecg/src/permission.js
  3. 69
      ant-design-vue-jeecg/src/views/hanger/ZyHangPointList.vue
  4. 3
      ant-design-vue-jeecg/src/views/hanger/modules/ZyHangForm.vue
  5. 197
      ant-design-vue-jeecg/src/views/hanger/modules/ZyHangPointForm.vue
  6. 278
      ant-design-vue-jeecg/src/views/maker/ZyMakerList.vue
  7. 97
      ant-design-vue-jeecg/src/views/maker/modules/ZyMakerFormDetail.vue
  8. 8
      ant-design-vue-jeecg/src/views/productplan/ZyProductPlanList.vue
  9. 6
      ant-design-vue-jeecg/src/views/shopping/components/Header/HeaderView.vue
  10. 2
      ant-design-vue-jeecg/src/views/shopping/pages/clothType.vue
  11. 2
      ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
  12. 262
      ant-design-vue-jeecg/src/views/shopping/pages/orderDetails.vue
  13. 36
      ant-design-vue-jeecg/src/views/shopping/shopHome.vue
  14. 1
      jeecg-boot/jeecg-boot-module-process/src/main/java/org/jeecg/modules/demo/base/controller/ZyClothsTypeController.java
  15. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/controller/ZyHangPointController.java
  16. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/entity/ZyHangPoint.java
  17. 1
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/service/IZyHangPointService.java
  18. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/hanger/service/impl/ZyHangPointServiceImpl.java
  19. 238
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/maker/controller/ZyMakerController.java
  20. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/maker/entity/ZyMaker.java
  21. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/maker/mapper/ZyMakerMapper.java
  22. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/maker/service/IZyMakerService.java
  23. 92
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/maker/service/impl/ZyMakerServiceImpl.java

@ -322,7 +322,7 @@ export const JeecgListMixin = {
zyStyleFabricHandleAdd: function (id) {
this.$refs.modalForm.add(id);
this.$refs.modalForm.title = "新增";
console.log("js层id的传递"+id);
//console.log("js层id的传递"+id);
this.$refs.modalForm.disableSubmit = false;
},
styleModuleHandleAdd: function (id,typeId,styleNames) {

@ -18,7 +18,8 @@ const whiteList = ['/user/login','/userequip/loginequip','/user/sgin',
'/gygl/gyglzxt','/sykesjk/sykcsjkzxt','/scrysjk/scrysjkzxt','/jxrysjk/jxrysjkzxt','/jxzz/jxzzglsjkzxt','/scys/scyssjkzxt',
'/sckz/sckzzxt','/sbjm/sbjmsjkzxt','/jxgl/jxglsjkzxt','/szls/szlssjkzxt','/jxdsj/jxdsjzszxt',
'/ybgl/ybglsjkzxt','/mflgl/mflglsjkzxt','/ddcl/ddclzxt','/ddgl/ddglzxt','/dyhsc/dyhsczxt','/znyy/znyysczhgkzzrj',
'/znyyjc/znyycjrjxt','/gdgz/gdgzzxt','/shopping/shopHome','/shopping/clothType','/shopping/sirendingzhi','/shopping/ClothDetail','/shopping/person','/shopping/person','/shopping/order'] // no redirect whitelist
'/znyyjc/znyycjrjxt','/gdgz/gdgzzxt','/shopping/shopHome','/shopping/clothType','/shopping/sirendingzhi',
'/shopping/ClothDetail','/shopping/person','/shopping/person','/shopping/order'] // no redirect whitelist
router.beforeEach((to, from, next) => {
NProgress.start() // start progress bar

@ -4,6 +4,21 @@
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="吊挂编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer">
<a-input v-model="queryParam.code" placeholder="请输入吊挂编号"></a-input>
</a-form-model-item>
</a-col><a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-model-item label="工站编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="organizer">
<a-input v-model="queryParam.point" placeholder="请输入工站编号"></a-input>
</a-form-model-item>
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
@ -13,11 +28,11 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('吊挂工位表')">导出</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>
<!-- <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>
<!-- <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>
@ -47,43 +62,12 @@
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">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" 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-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
@ -124,7 +108,7 @@
{
title:'吊挂编号',
align:"center",
dataIndex: 'code_dictText'
dataIndex: 'code'
},
{
title:'工站编号',
@ -132,7 +116,7 @@
dataIndex: 'point'
},
{
title:'工位id',
title:'工位名称',
align:"center",
dataIndex: 'stationId_dictText'
},
@ -151,7 +135,7 @@
deleteBatch: "/org.jeecg.modules.hanger/zyHangPoint/deleteBatch",
exportXlsUrl: "/org.jeecg.modules.hanger/zyHangPoint/exportXls",
importExcelUrl: "org.jeecg.modules.hanger/zyHangPoint/importExcel",
},
dictOptions:{},
superFieldList:[],
@ -177,7 +161,4 @@
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
</script>

@ -61,6 +61,8 @@
<a-form-model-item label="管理人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="administrator">
<!-- <a-input v-model="model.administrator" placeholder="请输入管理人"></a-input>-->
<j-select-user-by-dep v-model="model.administrator" :multi="false"/>
<!-- <j-dict-select-tag type="list" v-model="model.administrator"-->
<!-- placeholder="请选择管理人" :dict-code="enterprisesManager"/>-->
</a-form-model-item>
</a-col>
<a-col :span="24">
@ -105,6 +107,7 @@ export default {
},
data () {
return {
// enterprisesManager: "sys_user,realname,id",
model:{
status:1,
},

@ -5,17 +5,26 @@
<a-row>
<a-col :span="24">
<a-form-model-item label="吊挂编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
<j-dict-select-tag type="list" v-model="model.code" dictCode="" placeholder="请选择吊挂编号" />
<j-dict-select-tag type="list" v-model="model.code" dictCode="zy_hang,code,code"
placeholder="请选择吊挂编号"/>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工站编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="point">
<a-input v-model="model.point" placeholder="请输入工站编号" ></a-input>
<a-input v-model="model.point" placeholder="请输入工站编号"></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="工位id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationId">
<j-dict-select-tag type="list" v-model="model.stationId" dictCode="" placeholder="请选择工位id" />
<a-form-model-item label="工位" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stationId">
<j-dict-select-tag type="list" v-model="model.stationId" dictCode="station,station_name,id"
placeholder="请选择工位"/>
<!-- <j-tree-select v-model="model.departId"-->
<!-- dict="station,station_name,id"-->
<!-- pidField="depart_id"-->
<!-- placeholder="请选择车间"-->
<!-- hasChildField="1"-->
<!-- >-->
<!-- </j-tree-select>-->
</a-form-model-item>
</a-col>
</a-row>
@ -26,93 +35,111 @@
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
import {httpAction, getAction} from '@/api/manage'
import {validateDuplicateValue} from '@/utils/util'
export default {
name: 'ZyHangPointForm',
components: {
},
props: {
//
disabled: {
type: Boolean,
default: false,
required: false
export default {
name: 'ZyHangPointForm',
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: {
code: [
{required: true, message: '吊挂编号不能为空'},
// {pattern: /^\d{0,6}$/, message: '!'},
],
stationId: [
{required: true, message: '工位编号不能为空'},
{pattern: /^\d{0,200}$/, message: '长度过长!'},
],
},
url: {
add: "/org.jeecg.modules.hanger/zyHangPoint/add",
getLastPointCode: "/org.jeecg.modules.hanger/zyHangPoint/getLastPointCode",
edit: "/org.jeecg.modules.hanger/zyHangPoint/edit",
queryById: "/org.jeecg.modules.hanger/zyHangPoint/queryById"
}
}
},
computed: {
formDisabled() {
return this.disabled
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
stationId: [
{ required: false},
{ pattern: /^\d{6,16}$/, message: '请输入6到16位数字!'},
],
},
url: {
add: "/org.jeecg.modules.hanger/zyHangPoint/add",
edit: "/org.jeecg.modules.hanger/zyHangPoint/edit",
queryById: "/org.jeecg.modules.hanger/zyHangPoint/queryById"
}
}
},
created() {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add() {
this.getLastPointCode();
this.edit(this.modelDefault);
},
computed: {
formDisabled(){
return this.disabled
},
getLastPointCode() {
getAction(this.url.getLastPointCode, {}).then((res) => {
if (res.success) {
this.model.point = res.result;
this.$forceUpdate();
} else {
this.$message.warning(res.message)
}
}).finally(() => {
confirmLoading = false;
})
},
created () {
//model
this.modelDefault = JSON.parse(JSON.stringify(this.model));
edit(record) {
this.model = Object.assign({}, record);
this.visible = true;
},
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;
})
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>

@ -11,25 +11,34 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<!-- <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<a-button @click="makerAdd" type="primary" icon="plus">制单</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('制单管理')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<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>
<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-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-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>
<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>
@ -52,7 +61,8 @@
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<img v-else :src="getImgView(text)" 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>
@ -68,27 +78,31 @@
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<!-- <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.id)">详情</a>
</a-menu-item>
<a-menu-item>
<a @click="qrPrint(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>
<a @click="handleDetail(record.id)">详情</a>
<a-divider type="vertical"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
<!-- <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.id)">详情</a>-->
<!-- </a-menu-item>-->
<!-- <a-menu-item>-->
<!-- <a @click="qrPrint(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>
<ZyMakerFormDetail ref="ZyMakerFormDetail"></ZyMakerFormDetail>
@ -99,106 +113,132 @@
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyMakerModal from './modules/ZyMakerModal'
import QRCode from "./modules/QRCode";
import ZyMakerFormDetail from './modules/ZyMakerFormDetail'
export default {
name: 'ZyMakerList',
mixins:[JeecgListMixin, mixinDevice],
components: {
QRCode,
ZyMakerModal,
ZyMakerFormDetail
},
data () {
return {
description: '制单管理管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'制单编号',
align:"center",
dataIndex: 'code'
},
{
title:'工单编号',
align:"center",
dataIndex: 'workerCode'
},
{
title:'模块名称',
align:"center",
dataIndex: 'modelName'
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: "/maker/zyMaker/list",
delete: "/maker/zyMaker/delete",
deleteBatch: "/maker/zyMaker/deleteBatch",
exportXlsUrl: "/maker/zyMaker/exportXls",
importExcelUrl: "maker/zyMaker/importExcel",
import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import ZyMakerModal from './modules/ZyMakerModal'
import QRCode from "./modules/QRCode";
import ZyMakerFormDetail from './modules/ZyMakerFormDetail'
import {getAction, postAction} from "@api/manage";
export default {
name: 'ZyMakerList',
mixins: [JeecgListMixin, mixinDevice],
components: {
QRCode,
ZyMakerModal,
ZyMakerFormDetail
},
data() {
return {
description: '制单管理管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: "center",
customRender: function (t, r, index) {
return parseInt(index) + 1;
}
},
dictOptions:{},
superFieldList:[],
}
},
created() {
{
title: '制单编号',
align: "center",
dataIndex: 'code'
},
{
title: '工单编号',
align: "center",
dataIndex: 'workerCode'
},
{
title: '产品编号',
align: "center",
dataIndex: 'productCode'
},
{
title: '产品名称',
align: "center",
dataIndex: 'productName'
},
{
title: '模块名称',
align: "center",
dataIndex: 'modelName'
},
{
title: '创建时间',
align: "center",
dataIndex: 'createTime'
},
{
title: '操作',
dataIndex: 'action',
align: "center",
fixed: "right",
width: 147,
scopedSlots: {customRender: 'action'}
}
],
url: {
list: "/maker/zyMaker/list",
listMakerAdd: "/maker/zyMaker/listMakerAdd",
delete: "/maker/zyMaker/delete",
deleteBatch: "/maker/zyMaker/deleteBatch",
exportXlsUrl: "/maker/zyMaker/exportXls",
importExcelUrl: "maker/zyMaker/importExcel",
},
dictOptions: {},
superFieldList: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
makerAdd() {
//this.url.listMakerAdd = '/maker/zyMaker/listMakerAdd';
postAction(this.url.listMakerAdd, null).then((res) => {
if(res.success){
this.$message.success(res.message);
this.loadData();
}else{
this.$message.warning(res.message);
}
// this.$emit('valueChange',1)
// this.close()
})
},
methods: {
initDictConfig(){
},
qrPrint(record) {
this.$refs.qrForm.edit(record);
this.$refs.qrForm.title = "二维码";
this.$refs.qrForm.disableSubmit = true;
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'code',text:'制单编号',dictCode:''})
fieldList.push({type:'string',value:'workerCode',text:'工单编号',dictCode:''})
fieldList.push({type:'string',value:'modelName',text:'模块名称',dictCode:''})
this.superFieldList = fieldList
},
handleDetail(id){
this.$refs.ZyMakerFormDetail.showModal(id)
// this.$children[0].showModal(id)
}
initDictConfig() {
},
qrPrint(record) {
this.$refs.qrForm.edit(record);
this.$refs.qrForm.title = "二维码";
this.$refs.qrForm.disableSubmit = true;
},
getSuperFieldList() {
let fieldList = [];
fieldList.push({type: 'string', value: 'code', text: '制单编号', dictCode: ''})
fieldList.push({type: 'string', value: 'workerCode', text: '工单编号', dictCode: ''})
fieldList.push({type: 'string', value: 'modelName', text: '模块名称', dictCode: ''})
this.superFieldList = fieldList
},
handleDetail(id) {
this.$refs.ZyMakerFormDetail.showModal(id)
// this.$children[0].showModal(id)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
@import '~@assets/less/common.less';
</style>

@ -11,17 +11,17 @@
>
<a-descriptions bordered size="small">
<a-descriptions-item label="制单编号" >
{{model.code}}
</a-descriptions-item>
<a-descriptions-item label="工单编号" >
{{model.workerCode}}
</a-descriptions-item>
<a-descriptions-item label="模块名称">
{{model.modelName}}
</a-descriptions-item>
</a-descriptions>
<a-descriptions bordered size="small">
<a-descriptions-item label="制单编号">
{{model.code}}
</a-descriptions-item>
<a-descriptions-item label="工单编号">
{{model.workerCode}}
</a-descriptions-item>
<a-descriptions-item label="模块名称">
{{model.modelName}}
</a-descriptions-item>
</a-descriptions>
</a-modal>
@ -29,44 +29,43 @@
</template>
<script>
export default {
name: 'ZyMakerFormDetail',
data () {
return {
visible: false,
confirmLoading: false,
model:{
},
}
export default {
name: 'ZyMakerFormDetail',
data() {
return {
visible: false,
confirmLoading: false,
model: {},
}
},
created() {
//model
// this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
showModal(id) {
// console.log(this.selectId)
this.visible = true;
this.$http.get('/maker/zyMaker/queryById?id=' + id).then(
res => {
this.model = res.result
console.log(this.data)
}
)
},
created () {
//model
// this.modelDefault = JSON.parse(JSON.stringify(this.model));
handleOk(e) {
this.ModalText = 'The modal will be closed after two seconds';
this.confirmLoading = true;
console.log(this.data)
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 1);
},
methods: {
showModal(id) {
// console.log(this.selectId)
this.visible = true;
this.$http.get('/maker/zyMaker/queryById?id='+id).then(
res=>{
this.model = res.result
console.log(this.data)
}
)
},
handleOk(e) {
this.ModalText = 'The modal will be closed after two seconds';
this.confirmLoading = true;
console.log(this.data)
setTimeout(() => {
this.visible = false;
this.confirmLoading = false;
}, 1);
},
handleCancel(e) {
console.log('Clicked cancel button');
this.visible = false;
},
},
}
handleCancel(e) {
console.log('Clicked cancel button');
this.visible = false;
},
},
}
</script>

@ -282,7 +282,6 @@ export default {
// },
},
methods: {
jumpPage1(record) {
this.$router.push({
path: '/productplan/ProductplanManage',
@ -308,19 +307,22 @@ export default {
}
}).finally(() => {
this.loading = false
this.loadData();
})
},
getPaiWeiTu(record) {
async getPaiWeiTu(record) {
// alert(JSON.stringify(record));
getAction(this.url.paiweitu, record).then((res) => {
if (res.success) {
console.log("the paiweitu----------" + JSON.stringify(res.result))
// console.log("the paiweitu----------" + JSON.stringify(res.result));
// alert(JSON.stringify(res.result));
} else {
this.$message.warning(res.message)
}
}).finally(() => {
this.loading = false
this.loadData();
})
},
}

@ -6,10 +6,10 @@
</div>
<div class="middle d-flex">
<router-link to="/shopping/shopHome" :style="{ color: fontColor }">首页</router-link>
<router-link to="/shopping/views/clothType" :style="{ color: fontColor }"
<router-link to="/shopping/clothType" :style="{ color: fontColor }"
>服装类型</router-link
>
<router-link to="/shopping/views/sirendingzhi" :style="{ color: fontColor }"
<router-link to="/shopping/sirendingzhi" :style="{ color: fontColor }"
>私人定制</router-link
>
<router-link to="cytj" :style="{ color: fontColor }"
@ -24,7 +24,7 @@
<!-- <img src="@/assets/sousuo.png" alt="" /> -->
<span class="iconfont icon-sousuo" :style="{ color: fontColor }"></span>
</router-link>
<router-link to="/shopping/views/person">
<router-link to="/shopping/person">
<!-- <img src="@/assets/gerenzhongxin.png" alt=""/> -->
<span
class="iconfont icon-gerenzhongxin"

@ -385,7 +385,7 @@
},
clothDetails(item) {
this.$router.push({
path: "/shopping/views/ClothDetail",
path: "/shopping/ClothDetail",
query: { id: item.id, title: item.title },
});
},

@ -71,7 +71,7 @@
<span class="f_20 c_1B">总计¥ {{item.total}}</span>
<span class="f_16 c_333 ">
<a class="btn ljzf" v-if="!item.pay">立即支付</a>
<router-link to="/shopping/views/order" class="btn ckxq">查看详情</router-link>
<router-link to="/shopping/order" class="btn ckxq">查看详情</router-link>
</span>
</p>
</div>

@ -6,11 +6,117 @@
<div class="orderMain">
<div class="jz">
<el-breadcrumb class="breadcrumb" separator="/">
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item>
<el-breadcrumb-item :to="{ path: '/shopping/views/clothType' }">上级页面</el-breadcrumb-item>
<!-- <el-breadcrumb-item>{{this.$route.query.title }}</el-breadcrumb-item>-->
</el-breadcrumb>
</el-breadcrumb>
<div class="d-flex">
<div class="l">
<div class="card">
<p class="f_24">已发货</p>
<a class="c_333 f_12">查看发票详情</a>
</div>
<div class="steps">
<a-steps direction="vertical" size="small" :current="1">
<a-step title="提交订单" description="2022-12-24 12:23:00" >
<a-icon slot="icon" type="container" />
</a-step>
<a-step title="已支付" description="This is a description." >
<a-icon slot="icon" type="credit-card" />
</a-step>
<a-step title="待生产" description="This is a description." >
<a-icon slot="icon" type="rocket" />
</a-step>
<a-step title="生产中" description="2022-12-24 12:23:00" >
<a-icon slot="icon" type="reconciliation" />
</a-step>
<a-step title="已发货" description="2022-12-24 12:23:00">
<a-icon slot="icon" type="car" />
</a-step>
<a-step title="已到货" description="This is a description." >
<a-icon slot="icon" type="home" />
</a-step>
<a-step title="已签收" description="This is a description." >
<a-icon slot="icon" type="printer" />
</a-step>
</a-steps>
</div>
</div>
<div class="r">
<div class="title d-flex">
<span class="f_20 c_333">订单号#6789086655<span class="line f_16 c_1B">|</span>2022-08-19</span>
<div class="right d-flex f_16"><span>数量</span><span>价格</span><span>总计</span></div>
</div>
<div class="d-flex orderDiv">
<div class="orderAddr">
<p class="headline">配送至</p>
<p class="text">河南省</p>
<p class="text">驻马店市 驿城区</p>
<p class="text">黄淮学院南校区学府花园26号楼3602</p>
<p class="text">463000</p>
<p class="headline">已发货</p>
<p class="text">您的订单已经发出</p>
<p class="headline">尊享免费配送您的物流单号</p>
<p class="text">4263882788397</p>
</div>
<div class="orderList ">
<div class="item d-flex">
<div class="img">
<img src="../assets/cloth001.png">
</div>
<div class="info">
<p class="f_14 c_333 headline">商品名商品名商品名商品名商品</p>
<p class="d-flex">款式<span>衬衫</span></p>
<p class="d-flex">尺码<span>XXL</span></p>
<p class="d-flex">主辅料<span>主料1辅料2辅料3辅料4辅料5辅料6</span></p>
</div>
<div class="right d-flex f_14 c_333">
<span>1</span><span>2478</span><span>2478</span>
</div>
</div>
<div class="item d-flex">
<div class="img">
<img src="../assets/cloth001.png">
</div>
<div class="info">
<p class="f_14 c_333 headline">商品名商品名商品名商品名商品</p>
<p class="d-flex">款式<span>衬衫</span></p>
<p class="d-flex">尺码<span>XXL</span></p>
<p class="d-flex">主辅料<span>主料1辅料2辅料3辅料4辅料5辅料6</span></p>
</div>
<div class="right d-flex f_14 c_333">
<span>1</span><span>2478</span><span>2478</span>
</div>
</div>
</div>
</div>
<div class="heji">
<p class="d-flex">
<span class="leftSide f_20" style="font-weight:500">购买人</span>
<span class="midst f_16">小记</span>
<span class="rightSide f_16" style="font-weight:500">4,956</span>
</p>
<p class="d-flex">
<span class="leftSide f_18">王贰</span>
<span class="midst f_16">运费总计</span>
<span class="rightSide f_16" style="font-weight:500">0</span>
</p>
<p class="d-flex">
<span class="leftSide"></span>
<span class="midst f_20" style="font-weight:600">总计</span>
<span class="rightSide f_20" style="font-weight:600">4,956</span>
</p>
</div>
</div>
</div>
<div class="btn"><a class="c_fff f_16">返回</a></div>
</div>
</div>
<Footer></Footer>
@ -40,10 +146,152 @@
@import '../assets/common.css';
.orderMain{
background: #F6F6F6;
.breadcrumb{
padding-top: 50px;
padding-bottom: 50px;
padding-bottom: 100px;
.jz{
.breadcrumb{
padding-top: 50px;
padding-bottom: 50px;
}
.d-flex{
justify-content: space-between;
.l{
width: 300px;
.card{
width: 300px;
height: 157px;
background: #FFFFFF;
margin-bottom: 20px;
text-align: center;
padding-top: 40px;
.f_24{
color: #C8A985;
margin-bottom: 20px;
}
.f_12{
padding: 5px 14px;
border: 1px solid #333333;
}
}
.steps{
width: 300px;
height: 736px;
background: #FFFFFF;
padding: 32px 55px;
}
}
.r{
width: 1110px;
height: 913px;
background: #FFFFFF;
padding: 54px 48px;
.title{
padding-bottom: 15px;
border-bottom: 1px solid #DADADA;
.line{
margin-left: 10px;
margin-right: 10px;
}
.right{
width: 25%;
span{
color: #C8A985;
}
}
}
.orderDiv{
padding-bottom: 20px;
border-bottom: 1px solid #DADADA;
.orderAddr{
width: 25%;
color: #333;
font-size: 16px;
p{
margin-bottom: 10px;
}
.headline{
font-weight: 500;
color: #C8A985;
margin-top: 30px;
}
.text{
font-weight: 400;
}
}
.orderList{
width: 75%;
.item{
padding-top: 30px;
border-bottom: 1px solid #DADADA;
&:last-of-type{
border: none;
}
.img{
width: 23.33%;
img{
width: 180px;
height: 180px;
}
}
.info{
width: 43.33%;
padding-right: 10px;
.headline{
font-weight: 500;
}
p{
span{
margin-left: 10px;
display: inline-block;
width: 80%;
}
}
}
.right{
width: 33.33%;
font-weight: 500;
}
}
}}
.heji{
padding: 30px 20px;
p{
span{
width: 20%;
color: #333;
}
.leftSide{
text-align: left;
}
.midst{
text-align: center;
}
.rightSide{
text-align: right;
}
}
}
}
}
}
.btn{
a{
display: inline-block;
width: 284px;
height: 56px;
background: #1B1B1B;
line-height: 56px;
}
&:hover{
color: red;
}
text-align: center;
margin-top: 60px;
}
}
</style>

@ -69,15 +69,33 @@
<div class="orange"></div>
<p class="desc">Recommending Commodities</p>
</div>
<el-carousel type="card" arrow="always">
<el-carousel-item v-for="(item, index) in clothList2" :key="index">
<div class="box">
<img :src="item.imgUrl" alt="" />
<p class="box1">CLOTHING NAM</p>
<p class="box2">15分钟前定制</p>
</div>
</el-carousel-item>
</el-carousel>
<a-carousel arrows :slides-to-show="3" :slides-to-scroll="1">
<div
slot="prevArrow"
slot-scope="props"
class="custom-slick-arrow"
style="left: 10px;zIndex: 1"
>
<a-icon type="left-circle" />
</div>
<div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px">
<a-icon type="right-circle" />
</div>
<div class="box" v-for="(item, index) in clothList2" :key="index">
<img :src="item.imgUrl" alt="" />
<p class="box1">CLOTHING NAM</p>
<p class="box2">15分钟前定制</p>
</div>
</a-carousel>
<!-- <el-carousel type="card" arrow="always">-->
<!-- <el-carousel-item v-for="(item, index) in clothList2" :key="index">-->
<!-- <div class="box">-->
<!-- <img :src="item.imgUrl" alt="" />-->
<!-- <p class="box1">CLOTHING NAM</p>-->
<!-- <p class="box2">15分钟前定制</p>-->
<!-- </div>-->
<!-- </el-carousel-item>-->
<!-- </el-carousel>-->
</div>
</div>
<div class="section5">

@ -237,6 +237,7 @@ public class ZyClothsTypeController extends JeecgController<ZyClothsType, IZyClo
return Result.error("只能选择一个企业");
} else {
//String enterpriseName = zyClothsTypeMapper.getEnterprisenameById(id);
//根据企业id 直接在数据库里面拿到企业缩写 然后处理一下空值问题
String enterpriseName = zyClothsTypeMapper.getEnterpriseNum(id);
//根据企业名称拿到企业编号 //two 是直接编号 然后做一个判断
return Result.OK(zyClothsTypeService.getEnterpriseNumsTwo(enterpriseName));

@ -57,6 +57,13 @@ public class ZyHangPointController extends JeecgController<ZyHangPoint, IZyHangP
return Result.OK(pageList);
}
@ApiOperation(value = "吊挂工位表-获取是后的吊拉编码", notes = "吊挂工位表-获取是后的吊拉编码")
@GetMapping(value = "/getLastPointCode")
public Result<?> getLastPointCode(HttpServletRequest req) {
return Result.OK(zyHangPointService.getLastPointCode());
}
/**
* 添加
*
@ -67,6 +74,8 @@ public class ZyHangPointController extends JeecgController<ZyHangPoint, IZyHangP
@ApiOperation(value = "吊挂工位表-添加", notes = "吊挂工位表-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyHangPoint zyHangPoint) {
String pointCode = zyHangPointService.getLastPointCode();
zyHangPoint.setPoint(pointCode);
zyHangPointService.save(zyHangPoint);
return Result.OK("添加成功!");
}

@ -10,6 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;
@ -77,5 +78,6 @@ public class ZyHangPoint implements Serializable {
*/
@Excel(name = "工位id", width = 15)
@ApiModelProperty(value = "工位id")
@Dict(dictTable = "station", dicCode = "id", dicText = "station_name")
private String stationId;
}

@ -12,4 +12,5 @@ import org.jeecg.modules.hanger.entity.ZyHangPoint;
*/
public interface IZyHangPointService extends IService<ZyHangPoint> {
String getLastPointCode();
}

@ -1,11 +1,15 @@
package org.jeecg.modules.hanger.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.hanger.entity.ZyHangPoint;
import org.jeecg.modules.hanger.mapper.ZyHangPointMapper;
import org.jeecg.modules.hanger.service.IZyHangPointService;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import java.util.List;
/**
* @Description: 吊挂工位表
@ -16,4 +20,17 @@ import org.springframework.stereotype.Service;
@Service
public class ZyHangPointServiceImpl extends ServiceImpl<ZyHangPointMapper, ZyHangPoint> implements IZyHangPointService {
@Override
public String getLastPointCode() {
List<ZyHangPoint> pointList = this.list(new LambdaQueryWrapper<ZyHangPoint>().orderByDesc(ZyHangPoint::getPoint));
String code = "";
if (ObjectUtils.isEmpty(pointList)) {
code = "P100";
} else {
String[] dgs = pointList.get(0).getPoint().split("P");
int val = new Integer(dgs[1]).intValue() + 1;
code = "P" + val + "";
}
return code;
}
}

@ -9,6 +9,7 @@ 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;
@ -36,133 +37,148 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
/**
* @Description: 制单管理
* @Author: jeecg-boot
* @Date: 2021-11-27
* @Date: 2021-11-27
* @Version: V1.0
*/
@Api(tags="制单管理")
@Api(tags = "制单管理")
@RestController
@RequestMapping("/maker/zyMaker")
@Slf4j
public class ZyMakerController extends JeecgController<ZyMaker, IZyMakerService> {
@Autowired
private IZyMakerService zyMakerService;
/**
* 分页列表查询
*
* @param zyMaker
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "制单管理-分页列表查询")
@ApiOperation(value="制单管理-分页列表查询", notes="制单管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyMaker zyMaker,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyMaker> queryWrapper = QueryGenerator.initQueryWrapper(zyMaker, req.getParameterMap());
Page<ZyMaker> page = new Page<ZyMaker>(pageNo, pageSize);
IPage<ZyMaker> pageList = zyMakerService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyMaker
* @return
*/
@AutoLog(value = "制单管理-添加")
@ApiOperation(value="制单管理-添加", notes="制单管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyMaker zyMaker) {
zyMakerService.save(zyMaker);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyMaker
* @return
*/
@AutoLog(value = "制单管理-编辑")
@ApiOperation(value="制单管理-编辑", notes="制单管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyMaker zyMaker) {
zyMakerService.updateById(zyMaker);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "制单管理-通过id删除")
@ApiOperation(value="制单管理-通过id删除", notes="制单管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
zyMakerService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "制单管理-批量删除")
@ApiOperation(value="制单管理-批量删除", notes="制单管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyMakerService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "制单管理-通过id查询")
@ApiOperation(value="制单管理-通过id查询", notes="制单管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
ZyMaker zyMaker = zyMakerService.getById(id);
if(zyMaker==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyMaker);
}
@Autowired
private IZyMakerService zyMakerService;
/**
* 分页列表查询
*
* @param zyMaker
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "制单管理-分页列表查询")
@ApiOperation(value = "制单管理-分页列表查询", notes = "制单管理-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(ZyMaker zyMaker,
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyMaker> queryWrapper = QueryGenerator.initQueryWrapper(zyMaker, req.getParameterMap());
Page<ZyMaker> page = new Page<ZyMaker>(pageNo, pageSize);
IPage<ZyMaker> pageList = zyMakerService.page(page, queryWrapper);
List<ZyMaker> zyMakerList = zyMakerService.ZyMakerVo(pageList.getRecords());
pageList.setRecords(zyMakerList);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyMaker
* @return
*/
@AutoLog(value = "制单管理-添加")
@ApiOperation(value = "制单管理-添加", notes = "制单管理-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ZyMaker zyMaker) {
zyMakerService.save(zyMaker);
return Result.OK("添加成功!");
}
/**
* 制单
*/
@AutoLog(value = "制单管理-制单")
@ApiOperation(value = "制单管理-制单", notes = "制单管理-制单")
@PostMapping(value = "/listMakerAdd")
public Result<?> listMakerAdd() {
//点击制单 点击后按产品模块分解成制单写入制单表
zyMakerService.listMakerAdd();
//zyMakerService.save(zyMaker);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyMaker
* @return
*/
@AutoLog(value = "制单管理-编辑")
@ApiOperation(value = "制单管理-编辑", notes = "制单管理-编辑")
@PutMapping(value = "/edit")
public Result<?> edit(@RequestBody ZyMaker zyMaker) {
zyMakerService.updateById(zyMaker);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "制单管理-通过id删除")
@ApiOperation(value = "制单管理-通过id删除", notes = "制单管理-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
zyMakerService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "制单管理-批量删除")
@ApiOperation(value = "制单管理-批量删除", notes = "制单管理-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
this.zyMakerService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
@AutoLog(value = "制单管理-通过id查询")
@ApiOperation(value = "制单管理-通过id查询", notes = "制单管理-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
ZyMaker zyMaker = zyMakerService.getById(id);
if (zyMaker == null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyMaker);
}
/**
* 导出excel
*
* @param request
* @param zyMaker
*/
* 导出excel
*
* @param request
* @param zyMaker
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyMaker zyMaker) {
return super.exportXls(request, zyMaker, ZyMaker.class, "制单管理");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyMaker.class);

@ -5,6 +5,7 @@ import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@ -66,6 +67,12 @@ public class ZyMaker implements Serializable {
@Excel(name = "工单编号", width = 15)
@ApiModelProperty(value = "工单编号")
private String workerCode;
/**产品编号*/
@TableField(exist = false)
private String productCode;
/**产品名称*/
@TableField(exist = false)
private String productName;
/**模块id*/
@Excel(name = "模块id", width = 15)
@ApiModelProperty(value = "模块id")

@ -3,8 +3,10 @@ package org.jeecg.modules.maker.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.maker.entity.ZyMaker;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.jeecg.modules.workproduct.entity.ZyProduct;
/**
* @Description: 制单管理
@ -14,4 +16,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface ZyMakerMapper extends BaseMapper<ZyMaker> {
@Select("select * from zy_product where work_order_id=#{workerCode}")
ZyProduct getProduct(String workerCode);
}

@ -3,6 +3,8 @@ package org.jeecg.modules.maker.service;
import org.jeecg.modules.maker.entity.ZyMaker;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
/**
* @Description: 制单管理
* @Author: jeecg-boot
@ -11,4 +13,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface IZyMakerService extends IService<ZyMaker> {
//点击制单 点击后按产品模块分解成制单写入制单表
void listMakerAdd();
List<ZyMaker> ZyMakerVo(List<ZyMaker> records);
}

@ -1,19 +1,109 @@
package org.jeecg.modules.maker.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.maker.entity.ZyMaker;
import org.jeecg.modules.maker.mapper.ZyMakerMapper;
import org.jeecg.modules.maker.service.IZyMakerService;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.service.IWorkOrderService;
import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.service.IZyProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* @Description: 制单管理
* @Author: jeecg-boot
* @Date: 2021-11-27
* @Date: 2021-11-27
* @Version: V1.0
*/
@Service
public class ZyMakerServiceImpl extends ServiceImpl<ZyMakerMapper, ZyMaker> implements IZyMakerService {
@Autowired
private IWorkOrderService workOrderService;
@Autowired
private IZyProductService productService;
@Resource
private ZyMakerMapper zyMakerMapper;
////点击制单 点击后按产品模块分解成制单写入制单表
@Override
public void listMakerAdd() {
//先拿到所有产品 产品暂定为服装款式里面的数据
List<WorkOrder> workOrderList = workOrderService.list();
for (WorkOrder workOrder : workOrderList) {
ZyMaker maker = new ZyMaker();
//制单编号 工单编号(22)+顺序号(2)
maker.setCode(getMakerCode(workOrder.getProductCode()));
//工单编号
maker.setWorkerCode(workOrder.getProductCode());
this.save(maker);
}
}
@Override
public List<ZyMaker> ZyMakerVo(List<ZyMaker> records) {
if (ObjectUtils.isEmpty(records)) {
return null;
}
//根据工单编号找到产品编号 产品名称
for (ZyMaker maker : records) {
ZyProduct zyProductMapper = zyMakerMapper.getProduct(maker.getWorkerCode());
// LambdaQueryWrapper<ZyProduct> queryWrapper = new LambdaQueryWrapper<>();
// queryWrapper.eq(ZyProduct::getWorkOrderId, maker.getWorkerCode());
// ZyProduct zyProduct = productService.getOne(queryWrapper);
//产品编号
if (!ObjectUtils.isEmpty(zyProductMapper)){
if (StringUtils.hasText(zyProductMapper.getProductCode())) {
maker.setProductCode(zyProductMapper.getProductCode());
}
if (StringUtils.hasText(zyProductMapper.getProductName())) {
maker.setProductName(zyProductMapper.getProductName());
}
}
//产品名称
}
return records;
}
private String getMakerCode(String productCode) {
if (StringUtils.isEmpty(productCode)) {
return "null";
}
List<ZyMaker> zyMakerList = this.list();
List<String> collect = zyMakerList.stream().map(ZyMaker::getCode).collect(Collectors.toList());
List<Long> longList = new ArrayList<>();
for (String makerCode : collect) {
String newNums = makerCode.trim();
if (StringUtils.isEmpty(newNums)) continue;
if (newNums.length() <= 2) longList.add(Long.valueOf(newNums));
else {
//拿到后6位 substring(4) 截掉前4位
String substring = newNums.substring(newNums.length() - 2);
longList.add(Long.valueOf(substring));
}
}
long max = Collections.max(longList) + 1;
if (Long.toString(max).length() > 2) {
String toString = Long.toString(max);
return toString.substring(toString.length() - 2);
}
return String.format("%02d", max);
}
}

Loading…
Cancel
Save