Merge remote-tracking branch 'origin/master'

zhc4dev
wangjiadong 2 years ago
commit 075c4aba02
  1. 40
      ant-design-vue-jeecg/src/views/mall/clothSample/ZyClothSampleList.vue
  2. 39
      ant-design-vue-jeecg/src/views/mall/clothSample/modules/ZyClothSampleForm.vue
  3. 22
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue
  4. 10
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyWorkOrderList.vue
  5. 203
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/workdep/JSelectProductionDep.vue
  6. 2
      ant-design-vue-jeecg/src/views/zyclothsample/ZyClothSampleList.vue
  7. 59
      ant-design-vue-jeecg/src/views/zyclothsample/modules/ZyClothSampleForm.vue
  8. 19
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/device/controller/ZyDeviceController.java
  9. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/productplan/service/impl/ZyPlanProcessServiceImpl.java
  10. 80
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/controller/WorkOrderController.java
  11. 15
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/controller/ZyClothSampleController.java
  12. 80
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/entity/ZyClothSample.java
  13. 6
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/mapper/ZyClothSampleMapper.java
  14. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/IZyClothSampleService.java
  15. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zyclothsample/service/impl/ZyClothSampleServiceImpl.java
  16. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zydevice/devicebrand/controller/ZyDevicebrandController.java
  17. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zydevice/devicemodel/controller/ZyDevicemodelController.java
  18. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zydevice/devicetype/controller/ZyDevicetypeController.java
  19. 3
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/zystylemodel/entity/ZyStyleModel.java

@ -146,32 +146,32 @@
align:"center", align:"center",
dataIndex: 'nums' dataIndex: 'nums'
}, },
{ // {
title:'成衣名称', // title:'',
align:"center", // align:"center",
dataIndex: 'clothName' // dataIndex: 'clothName'
}, // },
{ // {
title:'描述', // title:'',
align:"center", // align:"center",
dataIndex: 'descr' // dataIndex: 'descr'
}, // },
{ {
title:'图片', title:'图片',
align:"center", align:"center",
dataIndex: 'url', dataIndex: 'url',
scopedSlots: {customRender: 'imgSlot'} scopedSlots: {customRender: 'imgSlot'}
}, },
{ // {
title:'用户', // title:'',
align:"center", // align:"center",
dataIndex: 'userId' // dataIndex: 'userId'
}, // },
{ // {
title:'用户类型', // title:'',
align:"center", // align:"center",
dataIndex: 'type' // dataIndex: 'type'
}, // },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',

@ -3,36 +3,61 @@
<j-form-container :disabled="formDisabled"> <j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<a-col :span="24">
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId">
<j-dict-select-tag type="list" v-model="model.styleId" dictCode="" placeholder="请选择款式" />
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="款式型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stylemodelId">
<j-dict-select-tag type="list" v-model="model.stylemodelId" dictCode="" placeholder="请选择款式型号" />
</a-form-model-item>
</a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums"> <a-form-model-item label="编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="nums">
<a-input v-model="model.nums" placeholder="请输入编号" ></a-input> <a-input v-model="model.nums" placeholder="请输入编号" ></a-input>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="成衣名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothName"> <a-form-model-item label="模块样板" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="modelSample">
<a-input v-model="model.clothName" placeholder="请输入成衣名称" ></a-input> <j-image-upload isMultiple v-model="model.modelSample" ></j-image-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!--<a-col :span="24">-->
<!--<a-form-model-item label="成衣名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="clothName">-->
<!--<a-input v-model="model.clothName" placeholder="请输入成衣名称" ></a-input>-->
<!--</a-form-model-item>-->
<!--</a-col>-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="descr"> <a-form-model-item label="描述" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="descr">
<a-textarea v-model="model.descr" rows="4" placeholder="请输入描述"/> <a-textarea v-model="model.descr" rows="4" placeholder="请输入描述"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url"> <a-form-model-item label="效果图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="url">
<j-image-upload isMultiple v-model="model.url" ></j-image-upload> <j-image-upload isMultiple v-model="model.url" ></j-image-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId"> <a-form-model-item label="结构图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="structureDiagram">
<a-input v-model="model.userId" placeholder="请输入用户" ></a-input> <j-image-upload isMultiple v-model="model.structureDiagram" ></j-image-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="用户类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> <a-form-model-item label="排料图" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="layoutDiagram">
<a-input v-model="model.type" placeholder="请输入用户类型" ></a-input> <j-image-upload isMultiple v-model="model.layoutDiagram" ></j-image-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!--<a-col :span="24">-->
<!--<a-form-model-item label="用户" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userId">-->
<!--<a-input v-model="model.userId" placeholder="请输入用户" ></a-input>-->
<!--</a-form-model-item>-->
<!--</a-col>-->
<!--<a-col :span="24">-->
<!--<a-form-model-item label="用户类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">-->
<!--<a-input v-model="model.type" placeholder="请输入用户类型" ></a-input>-->
<!--</a-form-model-item>-->
<!--</a-col>-->
</a-row> </a-row>
</a-form-model> </a-form-model>
</j-form-container> </j-form-container>

@ -155,6 +155,7 @@
</div> </div>
<zy-orders-modal ref="modalForm" @ok="modalFormOk"></zy-orders-modal> <zy-orders-modal ref="modalForm" @ok="modalFormOk"></zy-orders-modal>
<j-select-production-dep ref="productionForm" @ok="paidanFormOk"/>
</a-card> </a-card>
</template> </template>
@ -164,6 +165,7 @@
import { mixinDevice } from '@/utils/mixin' import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ZyOrdersModal from '@/views/zyorders/modules/ZyOrdersModal' import ZyOrdersModal from '@/views/zyorders/modules/ZyOrdersModal'
import JSelectProductionDep from './workdep/JSelectProductionDep'
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
import Area from '@/components/_util/Area' import Area from '@/components/_util/Area'
import { httpAction, getAction } from '@/api/manage' import { httpAction, getAction } from '@/api/manage'
@ -172,7 +174,8 @@
name: 'ZyProductionOrderList', name: 'ZyProductionOrderList',
mixins:[JeecgListMixin, mixinDevice], mixins:[JeecgListMixin, mixinDevice],
components: { components: {
ZyOrdersModal ZyOrdersModal,
JSelectProductionDep
}, },
data () { data () {
return { return {
@ -376,7 +379,7 @@
deleteBatch: "/zyorders/zyOrders/deleteBatch", deleteBatch: "/zyorders/zyOrders/deleteBatch",
exportXlsUrl: "/zyorders/zyOrders/exportXls", exportXlsUrl: "/zyorders/zyOrders/exportXls",
importExcelUrl: "zyorders/zyOrders/importExcel", importExcelUrl: "zyorders/zyOrders/importExcel",
paidan:"/workorder/workOrder/paidan", paidan:"/workOrder/workOrder/paidan",
}, },
dictOptions:{}, dictOptions:{},
@ -395,7 +398,20 @@
}, },
methods: { methods: {
paidan(record){ paidan(record){
getAction(this.url.paidan,{id:record.id}).then((res) => { this.$refs.productionForm.showModal(record.id)
// getAction(this.url.paidan,{id:record.id}).then((res) => {
// if (res.success) {
// this.$message.success("");
// this.loadData();
// }else{
// this.$message.error(res.message);
// }
// })
},
paidanFormOk(orderId,depId) {
// /
getAction(this.url.paidan,{'orderId':orderId,'depId':depId}).then((res) => {
if (res.success) { if (res.success) {
this.$message.success("派单成功!"); this.$message.success("派单成功!");
this.loadData(); this.loadData();

@ -185,11 +185,11 @@
} }
], ],
url: { url: {
list: "/workorder/workOrder/workList", list: "/workOrder/workOrder/workList",
delete: "/workorder/workOrder/delete", delete: "/workOrder/workOrder/delete",
deleteBatch: "/workorder/workOrder/deleteBatch", deleteBatch: "/workOrder/workOrder/deleteBatch",
exportXlsUrl: "/workorder/workOrder/exportXls", exportXlsUrl: "/workOrder/workOrder/exportXls",
importExcelUrl: "workorder/workOrder/importExcel", importExcelUrl: "workOrder/workOrder/importExcel",
}, },
dictOptions:{}, dictOptions:{},

@ -0,0 +1,203 @@
<template>
<j-modal
:width="width"
:visible="visible"
:title="title"
switchFullscreen
@ok="handleOk"
@cancel="handleCancel"
style="top:50px"
cancelText="关闭"
>
<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">
</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="{ type: 'radio',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">
<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="handleDetail(record)">详情</a>
</span>
</a-table>
</div>
</a-card>
</j-modal>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
export default {
name: 'JSelectProductionDep',
mixins:[JeecgListMixin, mixinDevice],
components: {
},
data () {
return {
description: '生产部门管理页面',
title:'',
width:1200,
visible: false,
disableSubmit: false,
orderId:'',
//
columns: [
{
title: '序号',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'生产企业名称',
align:"center",
dataIndex: 'departName'
},
{
title:'部门编码',
align:"center",
dataIndex: 'orgCode'
},
{
title:'手机号',
align:"center",
dataIndex: 'mobile'
},
{
title:'地址',
align:"center",
dataIndex: 'address'
},
// {
// title: '',
// dataIndex: 'action',
// align:"center",
// fixed:"right",
// width:147,
// scopedSlots: { customRender: 'action' }
// }
],
url: {
list: "/workOrder/workOrder/JSelectPDList",
delete: "",
deleteBatch: "",
exportXlsUrl: "",
importExcelUrl: "",
},
dictOptions:{},
superFieldList:[],
selectedRowKeys: [],
selectdepRows: [],
selectdepIds: [],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
showModal(orderId) {
this.selectedRowKeys=[]
this.orderId=orderId
this.visible = true;
this.loadData();
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$emit('ok', this.orderId,this.selectedRowKeys[0]);
// console.log("selectedRowKeys"+this.selectedRowKeys);
// console.log("selectdepIds"+this.selectdepIds);
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
},
onSelectChange(selectedRowKeys, selectionRows) {
this.selectedRowKeys = selectedRowKeys;
this.selectionRows = selectionRows;
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'string',value:'productCode',text:'产品编号',dictCode:''})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

@ -217,7 +217,7 @@ export default {
{ {
title: '企业', title: '企业',
align: "center", align: "center",
dataIndex: 'userId_dictText' dataIndex: 'enterpriseId_dictText'
}, },
{ {
title: '创建时间', title: '创建时间',

@ -4,27 +4,46 @@
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-row> <a-row>
<a-col :span="24" > <a-col :span="24" >
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId"> <a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId" v-if="this.model.id==null">
<j-select-depart v-model="model.userId" @change="kuanshi" /> <j-select-depart v-model="model.enterpriseId" @change="kuanshi" />
</a-form-model-item>
<a-form-model-item label="企业" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="enterpriseId" v-else>
<j-select-depart v-model="model.enterpriseId" @change="kuanshi" disabled />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<!--关联服装款式表 zy_cloths_style 关联列名称 传值id--> <!--关联服装款式表 zy_cloths_style 关联列名称 传值id-->
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId"> <a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId" v-if="this.model.id==null">
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式" <j-dict-select-tag v-model="model.styleId" placeholder="请输入款式"
:dict-code="dict" @change="xiugai"></j-dict-select-tag> :dict-code="dict" @change="xiugai"></j-dict-select-tag>
</a-form-model-item>
<a-form-model-item label="款式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="styleId" v-else>
<j-dict-select-tag v-model="model.styleId" placeholder="请输入款式"
:dict-code="dict" @change="xiugai" disabled></j-dict-select-tag>
</a-form-model-item> </a-form-model-item>
<!-- 编码也是唯一的和id一样 --> <!-- 编码也是唯一的和id一样 -->
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
<a-form-model-item label="款式型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stylemodelId"> <a-form-model-item label="款式型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stylemodelId" v-if="this.model.id==null">
<!-- <a-input v-model="model.stylemodelId" placeholder="请输入款式型号" @change="(vaule) => handletypeSelect(value)"></a-input>--> <!-- <a-input v-model="model.stylemodelId" placeholder="请输入款式型号" @change="(vaule) => handletypeSelect(value)"></a-input>-->
<!-- <j-dict-select-tag v-model="model.stylemodelId" placeholder="请输入款式型号"--> <!-- <j-dict-select-tag v-model="model.stylemodelId" placeholder="请输入款式型号"-->
<!-- dict-code="zy_style_model,model_number,model_number"></j-dict-select-tag>--> <!-- dict-code="zy_style_model,model_number,model_number"></j-dict-select-tag>-->
<j-dict-select-tag v-model="model.stylemodelId" placeholder="请选择款式型号" <j-dict-select-tag v-model="model.stylemodelId" placeholder="请选择款式型号"
dictCode="modenumber" @change="gaibian"></j-dict-select-tag> :dictCode="modenumber" @change="gaibian"></j-dict-select-tag>
</a-form-model-item>
<a-form-model-item label="款式型号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="stylemodelId" v-else>
<!-- <a-input v-model="model.stylemodelId" placeholder="请输入款式型号" @change="(vaule) => handletypeSelect(value)"></a-input>-->
<!-- <j-dict-select-tag v-model="model.stylemodelId" placeholder="请输入款式型号"-->
<!-- dict-code="zy_style_model,model_number,model_number"></j-dict-select-tag>-->
<j-dict-select-tag v-model="model.stylemodelId" placeholder="请选择款式型号"
:dictCode="modenumber" @change="gaibian" disabled></j-dict-select-tag>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :span="24"> <a-col :span="24">
@ -90,7 +109,8 @@ export default {
model: { model: {
nums:'', nums:'',
}, },
dict:"zy_cloths_style,style_names,nums", dict:"zy_cloths_style,style_names,id",
modenumber:'zy_style_model,model_number,id',
labelCol: { labelCol: {
xs: {span: 24}, xs: {span: 24},
sm: {span: 5}, sm: {span: 5},
@ -152,30 +172,34 @@ export default {
}, },
// //
kuanshi(){ kuanshi(){
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'"; this.dict="zy_cloths_style,style_names,id,enterprise_id="+"'"+this.model.enterpriseId+"'";
this.model.styleId=null this.model.styleId=null
this.model.nums=null
}, },
xiugai(){ xiugai(){
if(this.model.stylemodelId!=null&&this.model.userId!=null){ this.modenumber="zy_style_model,model_number,id,style_id="+"'"+this.model.styleId+"'"
this.gaibian() this.model.stylemodelId=null
} this.model.nums=null
// if(this.model.stylemodelId!=null&&this.model.enterpriseId!=null){
// this.gaibian()
// }
}, },
gaibian(){ gaibian(){
var n=3; var n=3;
console.log(this.model) console.log(this.model)
getAction(this.url.sort,this.model).then((res)=>{ getAction(this.url.sort,this.model).then((res)=>{
console.log(res) console.log(res.result[1])
if(this.model.id!=null){ if(this.model.id==null||parseInt(res.result[1],10)==0){
var num=parseInt(res.result,10) var num=parseInt(res.result[1],10)+1
}else{
var num=parseInt(res.result,10)+1
}else{
var num=parseInt(res.result[1],10)
} }
num=num.toString() num=num.toString()
while(num.length<n){ while(num.length<n){
num="0"+num num="0"+num
} }
this.model.nums=this.model.styleId+this.model.stylemodelId+num; this.model.nums=res.result[2]+res.result[0]+num;
console.log( this.model.nums) console.log( this.model.nums)
})}, })},
// select // select
@ -188,7 +212,8 @@ export default {
}, },
edit(record) { edit(record) {
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.userId+"'"; this.dict="zy_cloths_style,style_names,nums,enterprise_id="+"'"+this.model.enterpriseId+"'";
this.modenumber="zy_style_model,model_number,id,style_id="+"'"+this.model.styleId+"'"
this.visible = true; this.visible = true;
} }
, ,

@ -174,24 +174,7 @@ public class ZyDeviceController extends JeecgController<ZyDevice, IZyDeviceServi
QueryWrapper queryWrapper=new QueryWrapper(); QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("name",zyDevice.getName()); queryWrapper.eq("name",zyDevice.getName());
int a=zyDeviceService.count(queryWrapper); int a=zyDeviceService.count(queryWrapper);
if(a==0){ if(a<2){
if(zyDevice.getModelId()!=null&&!zyDevice.getModelId().equals("")){
ZyDevicemodel zyDevicemodel=zyDeviceService.findByModelId(zyDevice.getModelId());
if(zyDevicemodel.getBrandId()!=null){
zyDevice.setBrandId(zyDevicemodel.getBrandId());
zyDevice.setTypeCode(zyDevicemodel.getDevicetypeCode());
}
}
String code=zyDeviceService.getCode();
if(code==null||code.equals("")){
zyDevice.setCode(zyDevice.getTypeCode()+"001");
}else{
String sort=String.valueOf(Integer.parseInt(code.substring(6))+1);
while(sort.length()<3){
sort="0"+sort;
}
zyDevice.setCode(zyDevice.getTypeCode()+sort);
}
zyDeviceService.updateById(zyDevice); zyDeviceService.updateById(zyDevice);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
}else{ }else{

@ -32,7 +32,7 @@ import org.springframework.util.ObjectUtils;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import static com.sun.tools.internal.xjc.reader.Ring.add;
/** /**
* @Description: 生产计划工序 * @Description: 生产计划工序

@ -23,10 +23,14 @@ import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService; import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders; import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService; import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.jeecg.modules.workorder.entity.WorkOrder; import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.service.IWorkOrderService; import org.jeecg.modules.workorder.service.IWorkOrderService;
import org.jeecg.modules.workproduct.entity.ZyProduct; import org.jeecg.modules.workproduct.entity.ZyProduct;
import org.jeecg.modules.workproduct.service.IZyProductService; import org.jeecg.modules.workproduct.service.IZyProductService;
import org.jeecg.modules.zyclothsample.entity.ZyClothSample;
import org.jeecg.modules.zyclothsample.service.IZyClothSampleService;
import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle; import org.jeecg.modules.zyclothsstyle.entity.ZyClothsStyle;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService; import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel; import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
@ -84,6 +88,14 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
//顾客测体 //顾客测体
@Autowired @Autowired
private ICustomerMeasureService customerMeasureService; private ICustomerMeasureService customerMeasureService;
//成衣样板
@Autowired
private IZyClothSampleService zyClothSampleService;
//部门
@Autowired
private ISysDepartService sysDepartService;
/** /**
* 分页列表查询 * 分页列表查询
* *
@ -252,6 +264,31 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
return Result.OK(pageList); return Result.OK(pageList);
} }
/**
* 选择生产部门列表查询
*
* @param sysDepart
* @param pageNo
* @param pageSize
* @param req
* @return
*/
@AutoLog(value = "选择生产部门-分页列表查询")
@ApiOperation(value="选择生产部门-分页列表查询", notes="选择生产部门-分页列表查询")
@GetMapping(value = "/JSelectPDList")
public Result<?> queryPageJSelectPDList(SysDepart sysDepart,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<SysDepart> queryWrapper = QueryGenerator.initQueryWrapper(sysDepart, req.getParameterMap());
Page<SysDepart> page = new Page<SysDepart>(pageNo, pageSize);
queryWrapper.eq("org_type",1);
queryWrapper.eq("org_category",2);
IPage<SysDepart> pageList = sysDepartService.page(page, queryWrapper);
return Result.OK(pageList);
}
/** /**
* 派单讲订单转为工单 * 派单讲订单转为工单
* *
@ -261,8 +298,8 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
@AutoLog(value = "派单") @AutoLog(value = "派单")
@ApiOperation(value="派单", notes="派单") @ApiOperation(value="派单", notes="派单")
@GetMapping(value = "/paidan") @GetMapping(value = "/paidan")
public Result<?> paidan(@RequestParam(name="id",required=true) String id,HttpServletRequest req) { public Result<?> paidan(@RequestParam(name="orderId",required=true) String orderId,@RequestParam(name="depId",required=true) String depId,HttpServletRequest req) {
ZyOrders zyOrders = zyOrdersService.getById(id); ZyOrders zyOrders = zyOrdersService.getById(orderId);
if(zyOrders==null) { if(zyOrders==null) {
return Result.error("未找到对应数据!"); return Result.error("未找到对应数据!");
}else{ }else{
@ -273,30 +310,44 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
else {//start for 1 else {//start for 1
//商品订单是否存在 //商品订单是否存在
QueryWrapper<OrderGoods> ogWrapper=new QueryWrapper<OrderGoods>(); QueryWrapper<OrderGoods> ogWrapper=new QueryWrapper<OrderGoods>();
ogWrapper.eq("orders_id",id); ogWrapper.eq("orders_id",orderId);
List<OrderGoods> ogList=orderGoodsService.list(ogWrapper); List<OrderGoods> ogList=orderGoodsService.list(ogWrapper);
if(ogList.size()>0) if(ogList.size()>0)
{//start if 02 {//start if 02
// 保存工单 // 保存工单
OrderGoods ogModel=ogList.get(0); OrderGoods ogModel=ogList.get(0);
//服装款式 //服装款式
//QueryWrapper<ZyClothsStyle> csWrapper=new QueryWrapper<ZyClothsStyle>(); //QueryWrapper<ZyClothsStyle> csWrapper=new QueryWrapper<ZyClothsStyle>();
ZyClothsStyle csModel=zyClothsStyleService.getById(ogModel.getStyleId()); ZyClothsStyle csModel=zyClothsStyleService.getById(ogModel.getStyleId());
//服装型号 //服装型号
//QueryWrapper<ZyStyleModel> sm=new QueryWrapper<ZyStyleModel>(); //QueryWrapper<ZyStyleModel> sm=new QueryWrapper<ZyStyleModel>();
ZyStyleModel smModel=zyStyleModelService.getById(ogModel.getModelId()); ZyStyleModel smModel=zyStyleModelService.getById(ogModel.getModelId());
if(csModel==null ||smModel==null)
{
return Result.error("该订单服装型号或服装款式不存在,请检查后在操作!");
}
//得到结构图和排排料图
QueryWrapper<ZyClothSample> csWrapper=new QueryWrapper<ZyClothSample>();
csWrapper.eq("style_id",ogModel.getStyleId());
csWrapper.eq("stylemodel_id",ogModel.getModelId());
List<ZyClothSample> csList=zyClothSampleService.list(csWrapper);
// if(csList.size()<=0)
// {
// return Result.error("商品成衣样板不存在,请检查后在操作!");
// }
// ZyClothSample cSampleModel=csList.get(0);
int goodNum=ogModel.getGoodsNum(); int goodNum=ogModel.getGoodsNum();
WorkOrder workOrder=new WorkOrder(); WorkOrder workOrder=new WorkOrder();
workOrder.setProductCode(CreateWorkCode(csModel.getNums(),smModel.getModelNumber()));//工单编号 workOrder.setProductCode(CreateWorkCode(csModel.getNums(),smModel.getModelNumber()));//工单编号
workOrder.setOrdersId(id);//订单id workOrder.setOrdersId(orderId);//订单id
workOrder.setOrderGoodsId(ogModel.getId());// 订单商品 workOrder.setOrderGoodsId(ogModel.getId());// 订单商品
workOrder.setGoodsNum(goodNum);//商品数量 workOrder.setGoodsNum(goodNum);//商品数量
workOrder.setOrderTime(zyOrders.getOrderTime());//下单时间 workOrder.setOrderTime(zyOrders.getOrderTime());//下单时间
workOrder.setDeliveryTime(zyOrders.getDeliveryTime());//交货期 workOrder.setDeliveryTime(zyOrders.getDeliveryTime());//交货期
workOrder.setWorkOrderStatus(0);//工单状态 workOrder.setWorkOrderStatus(0);//工单状态
workOrder.setEnterprisesId(depId);//企业id
//暂时存疑
//workOrder.setEnterprisesId();//企业id
workOrderService.save(workOrder); workOrderService.save(workOrder);
//保存产品 //保存产品
@ -307,6 +358,8 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
if(mesureModel==null) { if(mesureModel==null) {
return Result.error("未找到对客户量体数据!"); return Result.error("未找到对客户量体数据!");
} }
for(int i=0;i<goodNum;i++) for(int i=0;i<goodNum;i++)
{ {
ZyProduct productModel=new ZyProduct(); ZyProduct productModel=new ZyProduct();
@ -319,9 +372,9 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
// productModel.setTotalMachine("");// 合计(设备秒) // productModel.setTotalMachine("");// 合计(设备秒)
// productModel.setEnterprisesId("");//_id 企业id // productModel.setEnterprisesId("");//_id 企业id
productModel.setUserId(zyOrders.getUserId());//_id 用户id productModel.setUserId(zyOrders.getUserId());//_id 用户id
// productModel.setStructureDiagram("");//_diagram 结构图 // productModel.setStructureDiagram(cSampleModel.getStructureDiagram());//_diagram 结构图
// productModel.setLayoutDiagram("");//_diagram 排料图 // productModel.setLayoutDiagram(cSampleModel.getLayoutDiagram());//_diagram 排料图
// productModel.setProductPicture("");//_picture 产品图片 // productModel.setProductPicture(cSampleModel.getUrl());//_picture 产品图片
productModel.setHeight(mesureModel.getHeight());// 身高 productModel.setHeight(mesureModel.getHeight());// 身高
productModel.setWeight(mesureModel.getWeight());// 体重 productModel.setWeight(mesureModel.getWeight());// 体重
productModel.setHem(mesureModel.getHem());// 下摆 productModel.setHem(mesureModel.getHem());// 下摆
@ -335,13 +388,14 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
productModel.setHipline(mesureModel.getHipline());// 臀围 productModel.setHipline(mesureModel.getHipline());// 臀围
productModel.setLength(mesureModel.getLength());// 衣长 productModel.setLength(mesureModel.getLength());// 衣长
productModel.setSternalDistance(mesureModel.getSternalDistance());//distance 胸距 productModel.setSternalDistance(mesureModel.getSternalDistance());//distance 胸距
productModel.setEnterprisesId(depId);//企业
zyProductService.save(productModel); zyProductService.save(productModel);
} }
}else }else
{ {
return Result.error("订单商品数量小于0!"); return Result.error("订单商品数量小于0!");
}
}
}else//end if 02 }else//end if 02
{ {
@ -349,6 +403,10 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
} }
}//end for 1 }//end for 1
} }
//修改订单状态
zyOrders.setDeliveryStatus(3);
zyOrdersService.updateById(zyOrders);
return Result.OK("成功"); return Result.OK("成功");
} }

@ -1,5 +1,6 @@
package org.jeecg.modules.zyclothsample.controller; package org.jeecg.modules.zyclothsample.controller;
import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -190,10 +191,18 @@ public class ZyClothSampleController extends JeecgController<ZyClothSample, IZyC
@GetMapping(value = "/sort") @GetMapping(value = "/sort")
public Result<?> sort(ZyClothSample zyClothSample) { public Result<?> sort(ZyClothSample zyClothSample) {
String s=zyClothSampleService.findSort(zyClothSample.getStyleId(),zyClothSample.getStylemodelId()); String s=zyClothSampleService.findSort(zyClothSample.getStyleId(),zyClothSample.getStylemodelId());
String code=zyClothSampleService.findCode(zyClothSample.getStylemodelId());
String styleId=zyClothSampleService.findStyleNums(zyClothSample.getStyleId());
List<String> list=new ArrayList<>();
list.add(code);
if(s==null){ if(s==null){
return Result.OK(0); list.add("0");
}else }else{
return Result.OK(s.substring(21)); list.add(s.substring(21));
}
list.add(styleId);
return Result.OK(list);
} }
} }

@ -35,6 +35,23 @@ public class ZyClothSample implements Serializable {
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private String id; private String id;
/**创建人*/
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建时间")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新时间*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间")
private java.util.Date updateTime;
/**编号*/ /**编号*/
@Excel(name = "编号", width = 15) @Excel(name = "编号", width = 15)
@ApiModelProperty(value = "编号") @ApiModelProperty(value = "编号")
@ -47,12 +64,12 @@ public class ZyClothSample implements Serializable {
*/ */
@Excel(name = "款式", width = 15) @Excel(name = "款式", width = 15)
@ApiModelProperty(value = "款式") @ApiModelProperty(value = "款式")
@Dict(dicCode = "nums",dictTable = "zy_cloths_style",dicText = "style_names") @Dict(dicCode = "id",dictTable = "zy_cloths_style",dicText = "style_names")
private String styleId; private String styleId;
/**型号*/ /**型号*/
@Excel(name = "型号", width = 15) @Excel(name = "型号", width = 15)
@ApiModelProperty(value = "型号") @ApiModelProperty(value = "型号")
@Dict(dicCode = "modenumber", dictTable = "", dicText = "") @Dict(dicCode = "id", dictTable = "zy_style_model", dicText = "model_number")
private String stylemodelId; private String stylemodelId;
/**管理模块样板*/ /**管理模块样板*/
@ -66,40 +83,41 @@ public class ZyClothSample implements Serializable {
@Dict(dicCode = "id",dictTable = "zy_module_sample",dicText = "module_name") @Dict(dicCode = "id",dictTable = "zy_module_sample",dicText = "module_name")
//@NotBlank(message = "模块样板不能为空") //@NotBlank(message = "模块样板不能为空")
private String modelSample; private String modelSample;
/**用户*/ // /**用户*/
@Excel(name = "用户", width = 15) // @Excel(name = "用户", width = 15)
@ApiModelProperty(value = "用户") // @ApiModelProperty(value = "用户")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") // @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
private String userId; // private String userId;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**成衣名称*/ // /**成衣名称*/
@Excel(name = "成衣名称", width = 15) // @Excel(name = "成衣名称", width = 15)
@ApiModelProperty(value = "成衣名称") // @ApiModelProperty(value = "成衣名称")
private String clothName; // private String clothName;
/**描述*/ /**描述*/
@Excel(name = "描述", width = 15) @Excel(name = "描述", width = 15)
@ApiModelProperty(value = "描述") @ApiModelProperty(value = "描述")
private String descr; private String descr;
/**图片*/ /**效果图片*/
@Excel(name = "图片", width = 15) @Excel(name = "效果图片", width = 15)
@ApiModelProperty(value = "图片") @ApiModelProperty(value = "效果图片片")
private String url; private String url;
/**用户类型*/ // /**用户类型*/
@Excel(name = "用户类型", width = 15) // @Excel(name = "用户类型", width = 15)
@ApiModelProperty(value = "用户类型") // @ApiModelProperty(value = "用户类型")
private String type; // private String type;
/**结构图*/
@Excel(name = "结构图", width = 15)
@ApiModelProperty(value = "结构图")
private java.lang.String structureDiagram;
/**排料图*/
@Excel(name = "排料图", width = 15)
@ApiModelProperty(value = "排料图")
private java.lang.String layoutDiagram;
/**企业*/
@Excel(name = "企业", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "企业")
private java.lang.String enterpriseId;
} }

@ -18,4 +18,10 @@ public interface ZyClothSampleMapper extends BaseMapper<ZyClothSample> {
@Select("select nums from zy_cloth_sample where style_id=#{styleId} and stylemodel_id=#{stylemodelId} order by nums desc limit 0,1") @Select("select nums from zy_cloth_sample where style_id=#{styleId} and stylemodel_id=#{stylemodelId} order by nums desc limit 0,1")
String findSort(@Param("styleId") String styleId, @Param("stylemodelId") String stylemodelId); String findSort(@Param("styleId") String styleId, @Param("stylemodelId") String stylemodelId);
@Select("select model_code from zy_style_model where id=#{stylemodelId}")
String findCode(String stylemodelId);
@Select("select nums from zy_cloths_style where id=#{styleId}")
String findNums(String styleId);
} }

@ -12,4 +12,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
public interface IZyClothSampleService extends IService<ZyClothSample> { public interface IZyClothSampleService extends IService<ZyClothSample> {
String findSort(String styleId, String stylemodelId); String findSort(String styleId, String stylemodelId);
String findCode(String stylemodelId);
String findStyleNums(String styleId);
} }

@ -23,4 +23,14 @@ public class ZyClothSampleServiceImpl extends ServiceImpl<ZyClothSampleMapper, Z
public String findSort(String styleId, String stylemodelId) { public String findSort(String styleId, String stylemodelId) {
return zyClothSampleMapper.findSort(styleId,stylemodelId); return zyClothSampleMapper.findSort(styleId,stylemodelId);
} }
@Override
public String findCode(String stylemodelId) {
return zyClothSampleMapper.findCode(stylemodelId);
}
@Override
public String findStyleNums(String styleId) {
return zyClothSampleMapper.findNums(styleId);
}
} }

@ -109,7 +109,7 @@ public class ZyDevicebrandController extends JeecgController<ZyDevicebrand, IZyD
QueryWrapper queryWrapper=new QueryWrapper(); QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("brand",zyDevicebrand.getBrand()); queryWrapper.eq("brand",zyDevicebrand.getBrand());
int a=zyDevicebrandService.count(queryWrapper); int a=zyDevicebrandService.count(queryWrapper);
if(a==0){ if(a<2){
zyDevicebrandService.updateById(zyDevicebrand); zyDevicebrandService.updateById(zyDevicebrand);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
}else{ }else{

@ -144,7 +144,7 @@ public class ZyDevicemodelController extends JeecgController<ZyDevicemodel, IZyD
QueryWrapper queryWrapper=new QueryWrapper(); QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("model",zyDevicemodel.getModel()); queryWrapper.eq("model",zyDevicemodel.getModel());
int a=zyDevicemodelService.count(queryWrapper); int a=zyDevicemodelService.count(queryWrapper);
if(a==0){ if(a<2){
zyDevicemodelService.updateById(zyDevicemodel); zyDevicemodelService.updateById(zyDevicemodel);
return Result.OK("编辑成功!"); return Result.OK("编辑成功!");
}else{ }else{

@ -107,7 +107,7 @@ public class ZyDevicetypeController extends JeecgController<ZyDevicetype, IZyDev
QueryWrapper queryWrapper=new QueryWrapper(); QueryWrapper queryWrapper=new QueryWrapper();
queryWrapper.eq("name",zyDevicetype.getName()); queryWrapper.eq("name",zyDevicetype.getName());
int a=zyDevicetypeService.count(queryWrapper); int a=zyDevicetypeService.count(queryWrapper);
if(a==0){ if(a<2){
zyDevicetypeService.updateById(zyDevicetype); zyDevicetypeService.updateById(zyDevicetype);
return Result.OK("编辑成功!");} return Result.OK("编辑成功!");}
else{ else{

@ -117,6 +117,9 @@ public class ZyStyleModel implements Serializable {
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
private java.util.Date updateTime; private java.util.Date updateTime;
@Excel(name = "型号对应的三位数字", width = 15)
@ApiModelProperty(value = "型号对应的三位数字")
private String modelCode;
} }

Loading…
Cancel
Save