Merge remote-tracking branch 'origin/master'

zhc4dev
zhc077 2 years ago
commit 4488220b03
  1. 59
      ant-design-vue-jeecg/src/views/shopping/components/billTitle.vue
  2. 100
      ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
  3. 539
      ant-design-vue-jeecg/src/views/shopping/pages/orderDetails.vue
  4. 17
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/service/IZyGoodsService.java
  5. 143
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zygoods/service/impl/ZyGoodsServiceImpl.java
  6. 18
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/controller/ZyOrdersController.java
  7. 5
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/entity/ZyOrdersJk.java
  8. 10
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/IZyOrdersService.java
  9. 241
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/impl/ZyOrdersServiceImpl.java
  10. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/operationtool/entity/ZyOperationtool.java
  11. 158
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
  12. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
  13. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml
  14. 9
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
  15. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/Grzx1.java
  16. 7
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/SysUserdfVO.java
  17. 4
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/IWorkOrderService.java
  18. 48
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/workorder/service/impl/WorkOrderServiceImpl.java

@ -34,7 +34,7 @@
</div>
<p><span v-if="item.customerType == 1">个人</span><span v-if="item.customerType == 2">企业</span></p>
<p>
{{item.username}}
{{item.name}}
</p>
<p>{{item.taxIdentificationNumber}}</p>
</div>
@ -61,13 +61,23 @@
:label-col="labelCol" :wrapper-col="wrapperCol"
class="modelForm"
>
<a-form-model-item label="客户类型" >
<a-radio-group v-model="form.customerType">
<a-radio :value="'1'">
个人
</a-radio>
<a-radio :value="'2'">
企业
</a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="发票类型" >
<a-select v-model="form.type" placeholder="请选择发票类型">
<a-select v-model="form.invoiceType" placeholder="请选择发票类型">
<a-select-option value="1">
专用发票
专用增值税发票
</a-select-option>
<a-select-option value="2">
普通发票
普通增值税发票
</a-select-option>
</a-select>
</a-form-model-item>
@ -78,16 +88,17 @@
<a-input placeholder="请输入发票抬头" v-model="form.name" />
</a-form-model-item>
<a-form-model-item
label="税号"
label="人识别号"
prop="dutyNum"
>
<a-input placeholder="请输入税号" v-model="form.dutyNum" />
<a-input placeholder="请输入人识别号" v-model="form.accountNumber" />
</a-form-model-item>
<a-form-model-item
label="公司注册电话"
prop="phone"
v-if="form.customerType == 2"
>
<a-input placeholder="请输入公司注册电话" v-model="form.phone">
<a-input placeholder="请输入公司注册电话" v-model="form.telephone">
<template slot="addonBefore">
<span>+86 中国大陆地区</span>
</template>
@ -96,12 +107,23 @@
<a-form-model-item
label="银行账户"
prop="card"
v-if="form.customerType == 2"
>
<a-input placeholder="请输入银行账户" v-model="form.card">
<a-input placeholder="请输入银行账户" v-model="form.bankDeposit">
</a-input>
</a-form-model-item>
<a-form-model-item label="公司注册地址" prop="detailed">
<a-input v-model="form.detailed" type="textarea" />
<a-form-model-item label="开户行" prop="bankzh">
<j-popup
v-model="form.bankzh"
field="bankzh"
org-fields="id,bankname"
dest-fields="bankDeposit,bankzh"
code="findyh"
:multi="true"
/>
</a-form-model-item>
<a-form-model-item label="地址" prop="detailed">
<a-input v-model="form.address" type="textarea" />
</a-form-model-item>
<a-form-model-item>
<a-checkbox @change="onChange" :checked="form.flag">
@ -117,7 +139,6 @@
import { httpAction, getAction } from '@/api/manage'
import { deleteAction } from '@/api/manage'
export default {
name: "billTitle",
components: { },
@ -132,7 +153,7 @@
/*billTitle:[
{
id:1,
type:'1',//12
type:'1',//12
name:'易创网络科技有限公司',
flag:true,//
dutyNum:'6974980492840298590',//
@ -193,13 +214,16 @@
addr1:'210521',
//
form: {
customerType:'1',//
id:'',
type: undefined,
invoiceType: undefined,
name: '',
addr: '',
dutyNum: '',
accountNumber: '',
account: '',
phone: '',
telephone: '',
address:'',
card:'',
flag:false//
},
@ -238,7 +262,7 @@
if(res.success) {
this.billTitle = res.result;
console.log(res.result)
this.visible = true;
// this.visible = true;
} else {
}
});
@ -319,13 +343,14 @@
this.visible = true
this.flag = 'edit'
this.form = item
console.log(this.form.customerType)
},
confirm2(id) {
getAction(this.url.szfpmr,{id,id}).then((res) => {
if(res.success) {
this.loadData(1);
// this.loadData(1);
} else {
}
});

@ -160,8 +160,15 @@
<span>订单编号{{item.orderNum}}</span>
<span>
<a class="delete">删除</a>
<a class="pay" v-if="!item.pay">未支付</a>
<a class="pay" v-if="item.pay">已支付</a>
<a class="pay" v-if="item.pay==='0'">未支付</a>
<a class="pay" v-if="item.pay==='1'">已支付</a>
<a class="pay" v-if="item.pay==='2'">待生产中</a>
<a class="pay" v-if="item.pay==='3'">生产中</a>
<a class="pay" v-if="item.pay==='4'">已发货</a>
<a class="pay" v-if="item.pay==='5'">已到货</a>
<a class="pay" v-if="item.pay==='6'">已签收</a>
<a class="pay" v-if="item.pay==='8'">申请撤销</a>
<a class="pay" v-if="item.pay==='9'">已撤销</a>
</span>
</div>
<div class="bottom d-flex">
@ -178,8 +185,8 @@
<p class="heji d-flex">
<span class="f_20 c_1B">总计¥ {{item.total}}</span>
<span class="f_16 c_333 ">
<a class="btn ljzf" v-if="!item.pay" @click="ljzf(item)">立即支付</a>
<a class="btn ljzf" v-if="!item.receipt && item.pay">确认收货</a>
<a class="btn ljzf" v-if="item.pay==='0'" @click="ljzf(item)">立即支付</a>
<a class="btn ljzf" v-if="!item.receipt && item.pay==='5'">确认收货</a>
<a class="btn ckxq" @click="openDetail(item)">查看详情</a>
</span>
</p>
@ -189,6 +196,40 @@
</div>
</div>
<password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
<a-modal v-model="visible3" class="toPay">
<template slot="title">
<div class="c_1B f_20" style="text-align: center;padding: 5px;font-weight: 500">支付宝支付</div>
</template>
<div class="d-flex"
style="
width: 450px;
padding: 30px 10px;
margin: 0 auto;">
<div class="l"
style="
width: 120px;
height: 120px;
margin-right: 20px;" @click="zhifu">
<img style="width: 120px;
height: 120px;" src="../assets/erweima.png"/>
</div>
<div class="r" style="width:290px">
<p class="f_16 c_4B">总计: </p>
<p class="f_14 c_4B">请使用支付宝扫描左图二维码进行支付</p>
<p class="f_14 c_4B">请您在15分钟内付款以免订单被取消如有疑问请联系客服</p>
<p class="f_14 c_4B">订单发货后您将收到订单发货通知短信</p>
</div>
</div>
<template slot="footer">
<div class="d-flex" style="justify-content: center;align-items:center">
<a-button style="margin-right: 30px;border:none;font-size: 12px">手机不在身边 登录账号付款</a-button>
<a-button style="font-size: 12px" size="small" @click="handleCancel2">
返回
</a-button>
</div>
</template>
</a-modal>
<Footer></Footer>
</div>
@ -349,6 +390,7 @@
desc: [{ required: true, message: 'Please input activity form', trigger: 'blur' }],*/
},
visible1: false,
visible3: false,
};
},
@ -373,6 +415,9 @@
id: id,
},
});
},
zhifu() {
},
passwordModalOk() {
//TODO datasource
@ -380,6 +425,9 @@
handleCancel(e) {
this.visible1 = false;
},
handleCancel2(e) {
this.visible3 = false;
},
handleChangePassword(username) {
this.$refs.passwordmodal.show(username);
},
@ -404,6 +452,7 @@
getAction(this.url.findgoods).then((res) => {
if(res.success) {
this.allOrders2 = res.result;
this.allOrders = res.result;
this.visible = true;
} else {
}
@ -449,12 +498,24 @@
openDetail(item) {
console.log('item')
console.log(item)
if(item.pay == false){
this.key = 'daizhifu'
}else if(item.pay == true && item.receipt == false){
this.key = 'daishouhuo'
}else if(item.receipt == true){
this.key = 'yiwancheng'
if(item.pay ==='0'){
this.key = 'wzf'
}else if(item.pay ==='1' ){
this.key = 'yzf'
}else if(item.pay =='2'){
this.key = 'dsc'
}else if(item.pay =='3'){
this.key = 'scz'
}else if(item.pay =='4'){
this.key = 'yfh'
}else if(item.pay =='5'){
this.key = 'ydh'
}else if(item.pay =='6'){
this.key = 'yqs'
}else if(item.pay =='8'){
this.key = 'sqcx'
}else if(item.pay =='9'){
this.key = 'ycx'
}
this.$router.push({
path: "/shopping/order",
@ -468,12 +529,13 @@
});
},
ljzf(item){
this.$router.push({
path: "/shopping/pay",
query: {
id: item.id,
},
});
// this.$router.push({
// path: "/shopping/pay",
// query: {
// id: item.id,
// },
// });
this.visible3 = true
},
menuChange(key){
this.current.shift()
@ -485,17 +547,17 @@
}
else if(key.key == 'daizhifu'){
/* this.allOrders = this.allOrders1.filter(item=>item.pay == false)*/
this.allOrders = this.allOrders2.filter(item=>item.pay == false)
this.allOrders = this.allOrders2.filter(item=>item.pay ==='0')
this.invoiceList=[]
}
else if(key.key == 'daishouhuo'){
/*this.allOrders = this.allOrders1.filter(item=>item.receipt == false && item.pay == true)*/
this.allOrders = this.allOrders2.filter(item=>item.receipt == false && item.pay == true)
this.allOrders = this.allOrders2.filter(item=>item.pay ==='4')
this.invoiceList=[]
}
else if(key.key == 'yiwancheng'){
/*this.allOrders = this.allOrders1.filter(item=>item.receipt == true)*/
this.allOrders = this.allOrders2.filter(item=>item.receipt == true)
this.allOrders = this.allOrders2.filter(item=>item.pay ==='6')
this.invoiceList=[]
}else if(key.key == 'invoice1'){//
this.invoiceList = this.invoiceList1

@ -1,5 +1,5 @@
<template>
<!-- 订单详情-->
<!-- 订单详情-->
<div class="orderDetails">
<Header fontColor="#000"></Header>
<div style="padding-top: 88px"></div>
@ -13,37 +13,61 @@
<div class="d-flex">
<div class="l">
<div class="card">
<p class="f_24" v-if="!this.model.pay">待支付</p>
<p class="f_24" v-if="!this.model.receipt && this.model.pay">待收货</p>
<p class="f_24" v-if="this.model.receipt">已完成</p>
<a class="c_333 f_12" v-if="this.model.receipt">查看发票详情</a>
<!-- <p class="f_24" v-if="!this.model.pay">待支付</p>
<p class="f_24" v-if="!this.model.receipt && this.model.pay">待收货</p>
<p class="f_24" v-if="this.model.receipt">已完成</p>
<a class="c_333 f_12" v-if="this.model.receipt">查看发票详情</a>-->
<p class="f_24">{{this.dingdaninfo.deliveryStatus}}</p>
<a class="c_333 f_12" @click="showModal" v-if="this.model.pay!=='0'">申请发票</a>
</div>
<div class="steps">
<a-steps direction="vertical" size="small" :current="current">
<a-step title="提交订单" description="2022-12-24 12:23:00" >
<a-step title="提交订单" :description="description" v-if="this.model.pay==='0'">
<a-icon slot="icon" type="container" />
</a-step>
<a-step title="已支付" description="This is a description." >
<a-step title="提交订单" v-else>
<a-icon slot="icon" type="container" />
</a-step>
<a-step title="已支付" :description="description" v-if="this.model.pay==='1'">
<a-icon slot="icon" type="credit-card" />
</a-step>
<a-step title="已支付" v-else>
<a-icon slot="icon" type="credit-card" />
</a-step>
<a-step title="待生产" description="This is a description." >
<a-step title="待生产" :description="description" v-if="this.model.pay==='2'">
<a-icon slot="icon" type="rocket" />
</a-step>
<a-step title="待生产" v-else>
<a-icon slot="icon" type="rocket" />
</a-step>
<a-step title="生产中" description="2022-12-24 12:23:00" >
<a-step title="生产中" :description="description" v-if="this.model.pay==='3'">
<a-icon slot="icon" type="reconciliation" />
</a-step>
<a-step title="生产中" v-else>
<a-icon slot="icon" type="reconciliation" />
</a-step>
<a-step title="已发货" description="2022-12-24 12:23:00">
<a-step title="已发货" :description="description" v-if="this.model.pay==='4'">
<a-icon slot="icon" type="car" />
</a-step>
<a-step title="已发货" v-else>
<a-icon slot="icon" type="car" />
</a-step>
<a-step title="已到货" description="This is a description." >
<a-step title="已到货" :description="description" v-if="this.model.pay==='5'">
<a-icon slot="icon" type="home" />
</a-step>
<a-step title="已到货" v-else>
<a-icon slot="icon" type="home" />
</a-step>
<a-step title="已签收" description="This is a description." >
<a-step title="已签收" :description="description" v-if="this.model.pay==='6'">
<a-icon slot="icon" type="printer" />
</a-step>
<a-step title="已签收" v-else>
<a-icon slot="icon" type="printer" />
</a-step>
@ -52,17 +76,27 @@
</div>
<div class="r">
<div class="title d-flex">
<span class="f_20 c_333">订单号#{{this.model.orderNum}}<span class="line f_16 c_1B">|</span>{{this.dingdaninfo.createTime}}</span>
<span class="f_20 c_333">订单号#{{this.dingdaninfo.orderNum}}<span class="line f_16 c_1B">|</span>{{this.dingdaninfo.createTime}}</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">{{this.dingdandh.address}}</p>
<p class="text">{{this.dingdandh.zipCode}}</p>
<p class="headline">{{this.dingdandh.deliveryStatus}}</p>
<a-button
class="defaultAddr"
style="padding-top: 10px;word-wrap: break-word;
overflow-wrap: break-word;
white-space: normal;
height: auto;
margin-bottom:10px;
text-align:left;
overflow: hidden;" >
<j-area-linkage disabled type="cascader" v-model="this.cityId" placeholder="请选择省市区"/>
<p class="text f_12">{{this.dingdaninfo.address}}</p>
<p class="text d-flex f_14"><span>{{this.dingdaninfo.zipCode}}</span></p>
<p class="headline">{{this.dingdaninfo.deliveryStatus}}</p>
</a-button>
<p class="text">您的订单已经发出</p>
<p class="headline">尊享免费配送您的物流单号</p>
<p class="text">4263882788397</p>
@ -70,13 +104,13 @@
<div class="orderList ">
<div class="item d-flex">
<div class="img">
<img src="{this.dingdaninfo.defaultPicture}">
<img :src="defaultPicture">
</div>
<div class="info">
<p class="f_14 c_333 headline">{{this.dingdaninfo.goodsName}}</p>
<p class="d-flex">款式<span>{{this.dingdaninfo.styleNames}}</span></p>
<p class="d-flex">尺码<span>{{this.dingdaninfo.modelNumber}}</span></p>
<p class="d-flex">主辅料<span>{{this.dingdaninfo.name}},{{this.dingdaninfo.typeName}}</span></p>
<p class="d-flex">主辅料<span>{{this.dingdaninfo.name}}</span></p>
</div>
<div class="right d-flex f_14 c_333">
<span>{{this.dingdaninfo.goodsNum}}</span><span>{{this.dingdaninfo.unitPrice}}</span><span>{{this.dingdaninfo.payTotalPrice}}</span>
@ -117,7 +151,133 @@
</div>
</div>
</div>
<div class="btn"><router-link to="/shopping/person" class="c_fff f_16">返回</router-link></div>
<div class="btn">
<router-link to="/shopping/person" class="c_fff f_16" style="margin-right: 30px">返回</router-link>
<a @click="ljgm" class="c_fff f_16">立即购买</a>
</div>
<a-modal
title="发票申请"
:visible="visible2"
:width="800"
>
<template slot="footer">
<a-button key="back" @click="handleCancel">
取消
</a-button>
<a-button key="submit" type="primary" @click="handleOk">
确定
</a-button>
</template>
<template>
<a-form-model
ref="ruleForm"
:model="form"
:rules="rules"
:label-col="labelCol" :wrapper-col="wrapperCol"
class="modelForm"
>
<a-form-model-item label="客户类型" >
<a-radio-group v-model="form.customerType">
<a-radio :value="'1'">
个人
</a-radio>
<a-radio :value="'2'">
企业
</a-radio>
</a-radio-group>
</a-form-model-item>
<a-form-model-item label="发票类型" >
<a-select v-model="form.invoiceType" placeholder="请选择发票类型">
<a-select-option value="1">
专用增值税发票
</a-select-option>
<a-select-option value="2">
普通增值税发票
</a-select-option>
</a-select>
</a-form-model-item>
<a-form-model-item
label="发票抬头"
prop="name"
>
<a-input placeholder="请输入发票抬头" v-model="form.name" />
</a-form-model-item>
<a-form-model-item
label="纳税人识别号"
prop="dutyNum"
>
<a-input placeholder="请输入纳税人识别号" v-model="form.accountNumber" />
</a-form-model-item>
<a-form-model-item
label="公司注册电话"
prop="phone"
v-if="form.customerType == 2"
>
<a-input placeholder="请输入公司注册电话" v-model="form.telephone">
<template slot="addonBefore">
<span>+86 中国大陆地区</span>
</template>
</a-input>
</a-form-model-item>
<a-form-model-item
label="银行账户"
prop="card"
v-if="form.customerType == 2"
>
<a-input placeholder="请输入银行账户" v-model="form.bankDeposit">
</a-input>
</a-form-model-item>
<a-form-model-item label="开户行" prop="bankzh">
<j-popup
v-model="form.bankzh"
field="bankzh"
org-fields="id,bankname"
dest-fields="bankDeposit,bankzh"
code="findyh"
:multi="true"
/>
</a-form-model-item>
<a-form-model-item label="地址" prop="detailed">
<a-input v-model="form.address" type="textarea" />
</a-form-model-item>
</a-form-model>
</template>
</a-modal>
<a-modal v-model="visible3" class="toPay">
<template slot="title">
<div class="c_1B f_20" style="text-align: center;padding: 5px;font-weight: 500">支付宝支付</div>
</template>
<div class="d-flex"
style="
width: 450px;
padding: 30px 10px;
margin: 0 auto;">
<div class="l"
style="
width: 120px;
height: 120px;
margin-right: 20px;" @click="zhifu">
<img style="width: 120px;
height: 120px;" src="../assets/erweima.png"/>
</div>
<div class="r" style="width:290px">
<p class="f_16 c_4B">总计: {{this.dingdaninfo.payTotalPrice}}</p>
<p class="f_14 c_4B">请使用支付宝扫描左图二维码进行支付</p>
<p class="f_14 c_4B">请您在15分钟内付款以免订单被取消如有疑问请联系客服</p>
<p class="f_14 c_4B">订单发货后您将收到订单发货通知短信</p>
</div>
</div>
<template slot="footer">
<div class="d-flex" style="justify-content: center;align-items:center">
<a-button style="margin-right: 30px;border:none;font-size: 12px">手机不在身边 登录账号付款</a-button>
<a-button style="font-size: 12px" size="small" @click="handleCancel2">
返回
</a-button>
</div>
</template>
</a-modal>
</div>
</div>
<Footer></Footer>
@ -132,17 +292,36 @@
components: { Header,Footer },
data() {
return {
visible2:false,
visible3:false,
cityId:"",
description:"",
defaultPicture:"",
current:0,//
model:{
id:'',
orderNum:'',
name:'',
pay:false,
pay:'',
receipt:false
},
dingdaninfo:{},
dingdandh:{},
dingdaninfo:{},
dingdandh:{},
labelCol: { span: 5 },
wrapperCol: { span: 19 },
form: {
customerType:'1',//
id:'',
invoiceType: undefined,
name: '',
addr: '',
accountNumber: '',
account: '',
telephone: '',
address:'',
card:'',
flag:false//
},
url: {
list: "/starehouse/starehouse/list",
@ -154,22 +333,40 @@
},
created() {
this.getallgoods();
this.getdingdandh();
//this.getdingdandh();
this.model.id = this.$route.query.id
this.model.orderNum = this.$route.query.orderNum
this.model.name = this.$route.query.name
this.model.pay = JSON.parse(this.$route.query.pay)
//this.model.name = this.$route.query.name
this.model.pay = this.$route.query.pay
this.model.receipt = JSON.parse(this.$route.query.receipt)
switch (this.$route.query.key) {
case 'daizhifu':
case 'wzf':
this.current=0
break;
case 'daishouhuo':
case 'yzf':
this.current=1
break;
case 'dsc':
this.current=2
break;
case 'scz':
this.current=3
break;
case 'yfh':
this.current=4
break;
case 'yiwancheng':
case 'ydh':
this.current=5
break;
case 'yqs':
this.current=6
break;
case 'sqcx':
this.current=7
break;
case 'ycx':
this.current=8
break;
}
@ -180,7 +377,12 @@
},
methods: {
ljgm(){
this.visible3 = true
},
zhifu() {
},
getdingdandh(){
getAction(this.url.getdingdandh,{ id: this.$route.query.id}).then((res) => {
if(res.success) {
@ -201,12 +403,27 @@
getAction(this.url.getdingdaninfo,{ id: this.$route.query.id}).then((res) => {
if(res.success) {
this.dingdaninfo = res.result;
this.defaultPicture = this.dingdaninfo.defaultPicture;
this.description=this.dingdaninfo.createTime;
this.cityId = this.dingdaninfo.cityId;
this.visible = true;
} else {
console.log("+++++++++++++++++++++")
}
});
}
},
showModal() {
this.visible2 = true;
},
handleOk(e) {
this.visible2 = false;
},
handleCancel(e) {
this.visible2 = false;
},
handleCancel2(e) {
this.visible3 = false;
},
},
@ -220,155 +437,169 @@
}
</style>
<style lang="less" scoped>
@import '../assets/common.css';
.orderMain{
background: #F6F6F6;
padding-bottom: 100px;
.jz{
.breadcrumb{
padding-top: 50px;
padding-bottom: 50px;
.j-area-linkage /deep/ .area-select{
background-color: #fff;
border: none;
span{
padding-left: 0;
font-size: 12px;
color:#313131;
cursor:auto;
font-weight: 500;
}
i{
display: none;
}
.d-flex{
justify-content: space-between;
.l{
width: 300px;
.card{
}
@import '../assets/common.css';
.orderMain{
background: #F6F6F6;
padding-bottom: 100px;
.jz{
.breadcrumb{
padding-top: 50px;
padding-bottom: 50px;
}
.d-flex{
justify-content: space-between;
.l{
width: 300px;
height: 157px;
background: #FFFFFF;
margin-bottom: 20px;
text-align: center;
padding-top: 40px;
.f_24{
color: #C8A985;
.card{
width: 300px;
height: 157px;
background: #FFFFFF;
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{
text-align: center;
padding-top: 40px;
.f_24{
color: #C8A985;
margin-bottom: 20px;
}
.f_12{
padding: 5px 14px;
border: 1px solid #333333;
}
}
}
.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;
.steps{
width: 300px;
height: 736px;
background: #FFFFFF;
padding: 32px 55px;
}
}
.orderList{
width: 75%;
.item{
padding-top: 30px;
.r{
width: 1110px;
height: 913px;
background: #FFFFFF;
padding: 54px 48px;
.title{
padding-bottom: 15px;
border-bottom: 1px solid #DADADA;
&:last-of-type{
border: none;
.line{
margin-left: 10px;
margin-right: 10px;
}
.img{
width: 23.33%;
img{
width: 180px;
height: 180px;
.right{
width: 25%;
span{
color: #C8A985;
}
}
.info{
width: 43.33%;
padding-right: 15px;
}
.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;
}
p{
span{
margin-left: 10px;
display: inline-block;
width: 75%;
}
.text{
font-weight: 400;
}
}
.right{
width: 33.33%;
font-weight: 500;
}
}
.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: 15px;
.headline{
font-weight: 500;
}
p{
span{
margin-left: 10px;
display: inline-block;
width: 75%;
}
}
}
.right{
width: 33.33%;
font-weight: 500;
}
}
}}
.heji{
padding: 30px 20px;
p{
span{
width: 20%;
color: #333;
}
.leftSide{
text-align: left;
}}
.heji{
padding: 30px 20px;
p{
span{
width: 20%;
color: #333;
}
.leftSide{
text-align: left;
}
.midst{
text-align: center;
}
.midst{
text-align: center;
}
.rightSide{
text-align: right;
}
.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;
}
}
.btn{
a{
display: inline-block;
width: 284px;
height: 56px;
background: #1B1B1B;
line-height: 56px;
}
&:hover{
color: red;
}
text-align: center;
margin-top: 60px;
}
}
</style>

@ -3,6 +3,8 @@ package org.jeecg.modules.demo.zygoods.service;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser;
import java.util.List;
@ -16,5 +18,20 @@ public interface IZyGoodsService extends IService<ZyGoods> {
public List<ZyGoods> selectByMainId(String mainId);
//随机获取商品
List<OrderGoodsJk> SJgetOrder();
/**
* 根据商品ID获取销售部门
* @return
*/
SysDepart getSalesEnterprise(String goodsId);
/**
* 根据商品ID获取销售人员
* @return
*/
SysUser getSalesperson(String goodsId);
/**
* 获取物流信息
* @return
*/
SysDepart getLogisticsEnterprises();
}

@ -5,6 +5,12 @@ import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import org.jeecg.modules.demo.zygoods.mapper.ZyGoodsMapper;
import org.jeecg.modules.demo.zygoods.service.IZyGoodsService;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.entity.SysUserDepart;
import org.jeecg.modules.system.mapper.SysDepartMapper;
import org.jeecg.modules.system.mapper.SysUserDepartMapper;
import org.jeecg.modules.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -24,6 +30,19 @@ public class ZyGoodsServiceImpl extends ServiceImpl<ZyGoodsMapper, ZyGoods> impl
@Autowired
private ZyGoodsMapper zyGoodsMapper;
//部门
@Autowired
private SysDepartMapper sysDepartMapper;
//部门-用户
@Autowired
private SysUserDepartMapper sysUserDepartMapper;
//用户
@Autowired
private SysUserMapper sysUserMapper;
@Override
public List<ZyGoods> selectByMainId(String mainId) {
return zyGoodsMapper.selectByMainId(mainId);
@ -67,5 +86,129 @@ public class ZyGoodsServiceImpl extends ServiceImpl<ZyGoodsMapper, ZyGoods> impl
return orderGoodsJkList;
}
/**
* 根据商品ID获取销售部门
* @return
*/
@Override
public SysDepart getSalesEnterprise(String goodsId) {
//根据商品id查找商品
ZyGoods goods=zyGoodsMapper.selectById(goodsId);
//根据企业id 查找部门id和父id等于企业id的部门列表
QueryWrapper<SysDepart> queryWrapper=new QueryWrapper();
queryWrapper.and(wrapper -> wrapper.eq("id", goods.getEnterprisesId())
.or().eq("parent_id", goods.getEnterprisesId())
);
List<SysDepart> depList=sysDepartMapper.selectList(queryWrapper);
//如果部门列表中有网店类型返回,如果没有则返回第一个部门
if(depList.size()>0)
{
SysDepart model=depList.get(0);
for(SysDepart dep:depList)
{
if(dep.getOrgCategory().trim().equals("4"))
{
model=dep;
break;
}
}
return model;
}
return null;
}
/**
* 根据商品ID获取销售人员
* @return
*/
@Override
public SysUser getSalesperson(String goodsId) {
//根据商品id查找商品
ZyGoods goods=zyGoodsMapper.selectById(goodsId);
//根据企业id 查找部门id和父id等于企业id的部门列表
QueryWrapper<SysDepart> queryWrapper=new QueryWrapper();
//查找网店类型部门
queryWrapper.eq("org_category", "4");
queryWrapper.and(wrapper -> wrapper.eq("id", goods.getEnterprisesId())
.or().eq("parent_id", goods.getEnterprisesId())
);
List<SysDepart> depList=sysDepartMapper.selectList(queryWrapper);
List<String> depIdsList=new ArrayList<>();
if(depList.size()>0)
{//如果存在网店类型部门在根据部门编号查找用户,如果用户不存在则查找所有部门
for(SysDepart dep:depList)
{
depIdsList.add(dep.getId());
}
//根据部门id查找对应用户
QueryWrapper<SysUserDepart> qwUserDepar=new QueryWrapper();
//qwUserDepar.select("DISTINCT user_id").in("dep_id",depIdsList);
qwUserDepar.in("dep_id",depIdsList);
List<SysUserDepart> udList=sysUserDepartMapper.selectList(qwUserDepar);
if(udList.size()>0)
{//根据查找得到数据 从中查询用户
SysUser userModel=sysUserMapper.selectById(udList.get(0).getUserId());
return userModel;
}
}
//
QueryWrapper<SysDepart> queryWrapper1=new QueryWrapper();
//所有部门
queryWrapper1.and(wrapper -> wrapper.eq("id", goods.getEnterprisesId())
.or().eq("parent_id", goods.getEnterprisesId())
);
depList=sysDepartMapper.selectList(queryWrapper1);
if(depList.size()>0)
{
for(SysDepart dep:depList)
{
depIdsList.add(dep.getId());
}
if(depIdsList.size()>0)
{
//根据部门id查找对应用户
QueryWrapper<SysUserDepart> qwUserDepar1=new QueryWrapper();
// qwUserDepar1.select("DISTINCT user_id").in("dep_id",depIdsList);
qwUserDepar1.in("dep_id",depIdsList);
List<SysUserDepart> udList=sysUserDepartMapper.selectList(qwUserDepar1);
//该部门所有用户
if(udList.size()>0)
{//根据查找得到数据 从中查询用户
SysUser userModel=sysUserMapper.selectById(udList.get(0).getUserId());
return userModel;
}
}
}
return null;
}
/**
* 获取物流信息
* @return
*/
@Override
public SysDepart getLogisticsEnterprises() {
//查找物流类型部门
QueryWrapper<SysDepart> queryWrapper=new QueryWrapper();
queryWrapper.eq("org_category", "7");
List<SysDepart> depList=sysDepartMapper.selectList(queryWrapper);
if(depList.size()>0)
{
return depList.get(0);
}
return null;
}
}

@ -138,8 +138,7 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
*/
@AutoLog(value = "订单和订单商品接口")
@ApiOperation(value="订单和订单商品接口", notes="订单和订单商品接口")
@GetMapping(value = "/orderJk")
public Result<?> orderJk(ZyOrdersJk zyOrdersJk,List<OrderGoodsJk> orderGoodsJkList,HttpServletRequest req) {
public List<String> orderJk(ZyOrdersJk zyOrdersJk,List<OrderGoodsJk> orderGoodsJkList) {
Double actual_payment = 0.00;
Double money = 0.00;
for(int i = 0 ; i < orderGoodsJkList.size() ; i++){
@ -207,7 +206,7 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
orderGoods.setPayTotalPrice(zyGoods.getPromotionPrice()*orderGoodsJkList.get(j).getGoodsNum());
orderGoodsService.save(orderGoods);
GoodsModule goodsModule = new GoodsModule();
QueryWrapper<GoodsModule> queryWrapperzsm = QueryGenerator.initQueryWrapper(goodsModule, req.getParameterMap());
QueryWrapper<GoodsModule> queryWrapperzsm = new QueryWrapper();
queryWrapperzsm.eq("goods_id",zyGoods.getId());
queryWrapperzsm.eq("style_id",zyGoods.getStyleId());
List<GoodsModule> listzsm = goodsModuleService.list(queryWrapperzsm);
@ -221,7 +220,7 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
orderGoodsModuleService.save(orderGoodsModule);
}
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrapperzsf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
QueryWrapper<GoodsFabric> queryWrapperzsf =new QueryWrapper();
queryWrapperzsf.eq("goods_id",zyGoods.getId());
List<GoodsFabric> listzsf = goodsFabricService.list(queryWrapperzsf);
for (int o = 0 ; o < listzsf.size() ; o++){
@ -232,7 +231,7 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
orderGoodsFabricService.save(orderGoodsFabric);
}
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperzsa = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
QueryWrapper<GoodsAccessories> queryWrapperzsa = new QueryWrapper();
queryWrapperzsa.eq("goods_id",zyGoods.getId());
List<GoodsAccessories> listzsa = goodsAccessoriesService.list(queryWrapperzsa);
for (int p = 0 ; p < listzsa.size() ; p++){
@ -247,14 +246,15 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
}
List<String> ids = new ArrayList<>();
ZyOrders zos = new ZyOrders();
QueryWrapper<ZyOrders> queryWrapperzos = QueryGenerator.initQueryWrapper(zos, req.getParameterMap());
QueryWrapper<ZyOrders> queryWrapperzos = new QueryWrapper();
queryWrapperzos.eq("order_id",zyOrders.getId());
List<ZyOrders> listzos = zyOrdersService.list(queryWrapperzos);
if(listzos.size()>0){
return Result.error("该订单已经拆分,不可以再次拆单!");
//return Result.error("该订单已经拆分,不可以再次拆单!");
return null;
}else{
OrderGoods orderGoods = new OrderGoods();
QueryWrapper<OrderGoods> queryWrapperog = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap());
QueryWrapper<OrderGoods> queryWrapperog = new QueryWrapper();
queryWrapperog.eq("orders_id",zyOrders.getId());
List<OrderGoods> listog = orderGoodsService.list(queryWrapperog);
if(listog.size()>0){
@ -279,7 +279,7 @@ public class ZyOrdersController extends JeecgController<ZyOrders, IZyOrdersServi
}
}
}
return Result.OK(ids);
return ids;
}

@ -82,4 +82,9 @@ public class ZyOrdersJk implements Serializable {
@Dict(dicCode = "delivery_status")
@ApiModelProperty(value = "交付状态")
private java.lang.Integer deliveryStatus;
/**顾客量体id*/
@Excel (name = "顾客量体id", width = 15, dictTable = "customer_measure", dicText = "username", dicCode = "id")
@ApiModelProperty (value = "顾客量体id")
private java.lang.String measureId;
}

@ -1,8 +1,10 @@
package org.jeecg.modules.demo.zyorders.service;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.demo.zyorders.entity.ZyOrdersJk;
import org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo;
import java.util.List;
@ -21,4 +23,12 @@ public interface IZyOrdersService extends IService<ZyOrders> {
List<ZyOrders> getOldOrder();
//大屏数据-获取今日订单及七日订单
TodayOrderAndQIriVo getOrder();
/**
*订单和订单商品接口
* @param ordersJk
* @param ogjkList
* @return
*/
List<String> orderJk(ZyOrdersJk ordersJk, List<OrderGoodsJk> ogjkList);
}

@ -1,15 +1,39 @@
package org.jeecg.modules.demo.zyorders.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice;
import org.jeecg.modules.demo.customerinvoice.mapper.CustomerInvoiceMapper;
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress;
import org.jeecg.modules.demo.customerreceivingaddress.mapper.CustomerReceivingAddressMapper;
import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories;
import org.jeecg.modules.demo.goodsaccessories.mapper.GoodsAccessoriesMapper;
import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric;
import org.jeecg.modules.demo.goodsfabric.mapper.GoodsFabricMapper;
import org.jeecg.modules.demo.goodsmodule.entity.GoodsModule;
import org.jeecg.modules.demo.goodsmodule.mapper.GoodsModuleMapper;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk;
import org.jeecg.modules.demo.ordergoods.mapper.OrderGoodsMapper;
import org.jeecg.modules.demo.ordergoodsaccessories.entity.OrderGoodsAccessories;
import org.jeecg.modules.demo.ordergoodsaccessories.mapper.OrderGoodsAccessoriesMapper;
import org.jeecg.modules.demo.ordergoodsfabric.entity.OrderGoodsFabric;
import org.jeecg.modules.demo.ordergoodsfabric.mapper.OrderGoodsFabricMapper;
import org.jeecg.modules.demo.ordergoodsmodule.entity.OrderGoodsModule;
import org.jeecg.modules.demo.ordergoodsmodule.mapper.OrderGoodsModuleMapper;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import org.jeecg.modules.demo.zygoods.mapper.ZyGoodsMapper;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.entity.ZyOrdersJk;
import org.jeecg.modules.demo.zyorders.mapper.ZyOrdersMapper;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
@ -23,6 +47,52 @@ import java.util.List;
@Service
public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> implements IZyOrdersService {
//商品
@Autowired
private ZyGoodsMapper zyGoodsMapper;
//订单商品表
@Autowired
private OrderGoodsMapper zyOrderGoodsMapper;
//商品模块表
@Autowired
private GoodsModuleMapper zyGoodsModuleMapper;
//订单商品模块表
@Autowired
private OrderGoodsModuleMapper zyOrderGoodsModuleMapper;
//商品面料表
@Autowired
private GoodsFabricMapper zyGoodsFabricMapper;
//订单商品面料表
@Autowired
private OrderGoodsFabricMapper zyOrderGoodsFabricMapper;
//商品辅料表
@Autowired
private GoodsAccessoriesMapper zyGoodsAccessoriesMapper;
//订单商品辅料表
@Autowired
private OrderGoodsAccessoriesMapper zyOrderGoodsAccessoriesMapper;
//顾客地址表
@Autowired
CustomerReceivingAddressMapper customerReceivingAddressMapper;
//客户发票信息
@Autowired
CustomerInvoiceMapper customerInvoiceMapper;
/**
* 大屏数据-获取订单的状态
* @return
@ -90,4 +160,175 @@ public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> i
}
}
/**
*
* @param zyOrdersJk
* @param orderGoodsJkList
* @return
*/
@Override
public List<String> orderJk(ZyOrdersJk zyOrdersJk, List<OrderGoodsJk> orderGoodsJkList) {
Double actual_payment = 0.00;
Double money = 0.00;
for(int i = 0 ; i < orderGoodsJkList.size() ; i++){
ZyGoods zyGoods = zyGoodsMapper.selectById(orderGoodsJkList.get(i).getGoodsId());
money = money + zyGoods.getUnitPrice()*orderGoodsJkList.get(i).getGoodsNum();
actual_payment = actual_payment + zyGoods.getPromotionPrice()*orderGoodsJkList.get(i).getGoodsNum();
}
ZyOrders zyOrders = new ZyOrders();
zyOrders.setIschild(0);
zyOrders.setOrderTime(new Date());
zyOrders.setOrdersNum(getOrdersNum());
zyOrders.setMoney(money);
zyOrders.setFreight(zyOrdersJk.getFreight());
zyOrders.setPromotionPrice(money-actual_payment);
zyOrders.setActualPayment(actual_payment);
zyOrders.setDeliveryTime(zyOrdersJk.getDeliveryTime());
zyOrders.setOrdersType(zyOrdersJk.getOrdersType());
zyOrders.setUserId(zyOrdersJk.getUserId());
zyOrders.setGoodsQuantity(zyOrdersJk.getGoodsQuantity());
CustomerReceivingAddress customerReceivingAddress = customerReceivingAddressMapper.selectById(zyOrdersJk.getAddressId());
zyOrders.setCityId(customerReceivingAddress.getCityId());
zyOrders.setAddress(customerReceivingAddress.getAddress());
zyOrders.setZipCode(customerReceivingAddress.getZipCode());
zyOrders.setReceiver(zyOrdersJk.getReceiver());
zyOrders.setMobile(customerReceivingAddress.getMobile());
CustomerInvoice customerInvoice = customerInvoiceMapper.selectById(zyOrdersJk.getInvoiceId());
zyOrders.setInvoiceCustomerType(Integer.parseInt(customerInvoice.getCustomerType()));
zyOrders.setInvoiceType(Integer.parseInt(customerInvoice.getInvoiceType()));
zyOrders.setTaxIdentificationNumber(customerInvoice.getTaxIdentificationNumber());
zyOrders.setAddressBilling(customerInvoice.getAddress());
zyOrders.setTelephone(customerInvoice.getTelephone());
zyOrders.setBankPublic(customerInvoice.getBankDeposit());
zyOrders.setAccountNumber(customerInvoice.getAccountNumber());
zyOrders.setSalesEnterpriseId(zyOrdersJk.getSalesEnterpriseId());
zyOrders.setSalespersonId(zyOrdersJk.getSalespersonId());
zyOrders.setLogisticsEnterprisesId(zyOrdersJk.getLogisticsEnterprisesId());
zyOrders.setDeliveryStatus(0);
baseMapper.insert(zyOrders);
for(int j = 0 ; j < orderGoodsJkList.size() ; j++){
ZyGoods zyGoods = zyGoodsMapper.selectById(orderGoodsJkList.get(j).getGoodsId());
OrderGoods orderGoods = new OrderGoods();
orderGoods.setOrdersId(zyOrders.getId());
orderGoods.setGoodsId(orderGoodsJkList.get(j).getGoodsId());
orderGoods.setGoodsNum(orderGoodsJkList.get(j).getGoodsNum());
orderGoods.setGoodsCode(zyGoods.getGoodsCode());
orderGoods.setGoodsName(zyGoods.getGoodsName());
orderGoods.setGoodsIntr(zyGoods.getGoodsIntr());
orderGoods.setCustomized(zyGoods.getCustomized());
orderGoods.setMeasureId(zyOrdersJk.getMeasureId());
orderGoods.setGoodsPicture(zyGoods.getGoodsPicture());
orderGoods.setDefaultPicture(zyGoods.getDefaultPicture());
orderGoods.setGoodsVideo(zyGoods.getGoodsVideo());
orderGoods.setClothsTypeId(zyGoods.getClothsTypeId());
orderGoods.setStyleId(zyGoods.getStyleId());
orderGoods.setModelId(zyGoods.getModelId());
orderGoods.setUnit(zyGoods.getUnit());
orderGoods.setNumber(zyGoods.getNumber());
orderGoods.setUnitPrice(zyGoods.getUnitPrice());
orderGoods.setDiscount(zyGoods.getDiscount());
orderGoods.setPromotionPrice(zyGoods.getPromotionPrice());
orderGoods.setRecommend(zyGoods.getRecommend());
orderGoods.setPlaceOrigin(zyGoods.getPlaceOrigin());
orderGoods.setStatus(zyGoods.getStatus());
orderGoods.setTotalPrice(zyGoods.getUnitPrice()*orderGoodsJkList.get(j).getGoodsNum());
orderGoods.setPayTotalPrice(zyGoods.getPromotionPrice()*orderGoodsJkList.get(j).getGoodsNum());
zyOrderGoodsMapper.insert(orderGoods);
GoodsModule goodsModule = new GoodsModule();
QueryWrapper<GoodsModule> queryWrapperzsm = new QueryWrapper();
queryWrapperzsm.eq("goods_id",zyGoods.getId());
queryWrapperzsm.eq("style_id",zyGoods.getStyleId());
List<GoodsModule> listzsm = zyGoodsModuleMapper.selectList(queryWrapperzsm);
for (int k = 0 ; k < listzsm.size() ; k++){
OrderGoodsModule orderGoodsModule = new OrderGoodsModule();
orderGoodsModule.setOrderGoodsId(orderGoods.getId());
orderGoodsModule.setGoodsId(zyGoods.getId());
orderGoodsModule.setStyleId(zyGoods.getStyleId());
orderGoodsModule.setStyleModuleId(listzsm.get(k).getStyleModuleId());
orderGoodsModule.setModuleId(listzsm.get(k).getModuleId());
zyOrderGoodsModuleMapper.insert(orderGoodsModule);
}
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrapperzsf =new QueryWrapper();
queryWrapperzsf.eq("goods_id",zyGoods.getId());
List<GoodsFabric> listzsf = zyGoodsFabricMapper.selectList(queryWrapperzsf);
for (int o = 0 ; o < listzsf.size() ; o++){
OrderGoodsFabric orderGoodsFabric = new OrderGoodsFabric();
orderGoodsFabric.setOrderGoodsId(orderGoods.getId());
orderGoodsFabric.setGoodsId(zyGoods.getId());
orderGoodsFabric.setFabricId(listzsf.get(o).getFabricId());
zyOrderGoodsFabricMapper.insert(orderGoodsFabric);
}
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperzsa = new QueryWrapper();
queryWrapperzsa.eq("goods_id",zyGoods.getId());
List<GoodsAccessories> listzsa = zyGoodsAccessoriesMapper.selectList(queryWrapperzsa);
for (int p = 0 ; p < listzsa.size() ; p++){
OrderGoodsAccessories orderGoodsAccessories = new OrderGoodsAccessories();
orderGoodsAccessories.setOrderGoodsId(orderGoods.getId());
orderGoodsAccessories.setGoodsId(zyGoods.getId());
orderGoodsAccessories.setAccessoriesId(listzsa.get(p).getAccessoriesId());
zyOrderGoodsAccessoriesMapper.insert(orderGoodsAccessories);
}
}
List<String> ids = new ArrayList<>();
ZyOrders zos = new ZyOrders();
QueryWrapper<ZyOrders> queryWrapperzos = new QueryWrapper();
queryWrapperzos.eq("order_id",zyOrders.getId());
List<ZyOrders> listzos = baseMapper.selectList(queryWrapperzos);
if(listzos.size()>0){
//return Result.error("该订单已经拆分,不可以再次拆单!");
return null;
}else{
OrderGoods orderGoods = new OrderGoods();
QueryWrapper<OrderGoods> queryWrapperog = new QueryWrapper();
queryWrapperog.eq("orders_id",zyOrders.getId());
List<OrderGoods> listog = zyOrderGoodsMapper.selectList(queryWrapperog);
if(listog.size()>0){
for (int i = 0 ; i < listog.size() ; i++){
ZyOrders zo = new ZyOrders();
zo = zyOrders;
zo.setId(null);
zo.setOrdersNum(getOrdersNum());
zo.setFreight(Double.parseDouble("0"));
zo.setIschild(1);
zo.setOrderId(zyOrders.getId());
zo.setMoney(listog.get(i).getTotalPrice());
zo.setPromotionPrice(listog.get(i).getPromotionPrice());
zo.setActualPayment(listog.get(i).getPayTotalPrice());
zo.setGoodsQuantity(1);
baseMapper.insert(zo);
ids.add(zo.getId());
OrderGoods og = new OrderGoods();
og = listog.get(i);
og.setOrdersId(zo.getId());
zyOrderGoodsMapper.updateById(og);
}
}
}
return ids;
}
/**
* 生成订单编号
*
* @param
* @return
*/
public String getOrdersNum() {
String mrstr = "000000000000000000";
QueryWrapper<ZyOrders> qw=new QueryWrapper();
int listsize = baseMapper.selectCount(qw);
int strsize = listsize+1;
String str = strsize+"";
int strlength = str.length();
String substr = mrstr.substring(0,mrstr.length()-strlength);
String OrdersNum = substr+str;
return OrdersNum;
}
}

@ -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;
@ -73,8 +74,9 @@ public class ZyOperationtool implements Serializable {
@Dict(dictTable = "zy_tool", dicText = "name", dicCode = "id")
@ApiModelProperty(value = "工具")
private String toolid;
@TableField (exist = false)
private String processCode;
@TableField(exist = false)
private String code;
}

@ -28,9 +28,20 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.*;
import org.jeecg.modules.demo.accessories.service.IZyAccessoriesService;
import org.jeecg.modules.demo.collecttype.entity.CollectType;
import org.jeecg.modules.demo.collecttype.service.ICollectTypeService;
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress;
import org.jeecg.modules.demo.fabric.service.IZyFabricService;
import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories;
import org.jeecg.modules.demo.goodsaccessories.service.IGoodsAccessoriesService;
import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric;
import org.jeecg.modules.demo.goodsfabric.service.IGoodsFabricService;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.ordergoods.service.IOrderGoodsService;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.orderbymakeclothplan.service.ZyOrderService;
import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.model.DepartIdModel;
@ -44,6 +55,9 @@ import org.jeecg.modules.team.entity.Groupx;
import org.jeecg.modules.team.entity.Station;
import org.jeecg.modules.team.service.IGroupxService;
import org.jeecg.modules.team.service.IStationService;
import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService;
import org.jeecg.modules.zystylemodel.entity.ZyStyleModel;
import org.jeecg.modules.zystylemodel.service.IZyStyleModelService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -112,6 +126,8 @@ public class SysUserController {
@Autowired
private IGroupxService iGroupxService;
@Autowired
private IZyOrdersService zyOrdersService;
@Value("${jeecg.path.upload}")
@ -120,6 +136,21 @@ public class SysUserController {
@Resource
private BaseCommonService baseCommonService;
@Autowired
private IOrderGoodsService orderGoodsService;
@Autowired
private IZyClothsStyleService zyClothsStyleService;
@Autowired
private IZyStyleModelService zyStyleModelService;
@Autowired
private IGoodsFabricService goodsFabricService;
@Autowired
private IGoodsAccessoriesService goodsAccessoriesService;
@Autowired
private IZyAccessoriesService zyAccessoriesService;
@Autowired
private IZyFabricService zyFabricService;
/**
* 获取用户列表数据
*
@ -1523,26 +1554,53 @@ public class SysUserController {
* @return
*/
@RequestMapping(value = "/findgoods", method = RequestMethod.GET)
public Result<?> findgoods() {
public Result<?> findgoods(HttpServletRequest req) {
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String userid = loginUser.getId();
List<Grzx1> gr1 = new ArrayList<>();
ZyOrders zyOrders = new ZyOrders();
QueryWrapper<ZyOrders> queryWrapperzos = QueryGenerator.initQueryWrapper(zyOrders, req.getParameterMap());
queryWrapperzos.eq("user_id",userid);
queryWrapperzos.eq("ischild",0);
List<ZyOrders> zyOrdersList = zyOrdersService.list(queryWrapperzos);
List<Grzx2> gr2 = new ArrayList<>();
gr1 =sysUserService.getallgr1(userid);
for (int i=0;i<gr1.size();i++){
for(int i = 0 ; i < zyOrdersList.size(); i++){
Grzx2 g2 = new Grzx2();
g2.setId(gr1.get(i).getId());
g2.setOrderNum(gr1.get(i).getOrdersNum());
g2.setPay(gr1.get(i).getDeliveryStatus());
g2.setId(zyOrdersList.get(i).getId());
g2.setOrderNum(zyOrdersList.get(i).getOrdersNum());
g2.setPay(zyOrdersList.get(i).getDeliveryStatus()+"");
g2.setReceipt("false");
g2.setUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+gr1.get(i).getDefaultPicture());
g2.setName(gr1.get(i).getGoodsName());
g2.setType(gr1.get(i).getStyleNames());
g2.setSize(gr1.get(i).getModelNumber());
g2.setNum(gr1.get(i).getGoodsNum());
g2.setPrice(gr1.get(i).getUnitPrice());
g2.setMaterial(gr1.get(i).getName()+","+gr1.get(i).getTypeName());
g2.setTotal(gr1.get(i).getPayTotalPrice());
OrderGoods orderGoods = new OrderGoods();
QueryWrapper<OrderGoods> queryWrapperogs = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap());
queryWrapperogs.eq("orders_id",zyOrdersList.get(i).getId());
List<OrderGoods> orderGoodsList = orderGoodsService.list(queryWrapperogs);
g2.setUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+orderGoodsList.get(0).getDefaultPicture());
g2.setName(orderGoodsList.get(0).getGoodsName());
g2.setType(zyClothsStyleService.getById(orderGoodsList.get(0).getStyleId()).getStyleNames());
ZyStyleModel zyStyleModel = new ZyStyleModel();
QueryWrapper<ZyStyleModel> queryWrapperzsm = QueryGenerator.initQueryWrapper(zyStyleModel, req.getParameterMap());
queryWrapperzsm.eq("style_id",orderGoodsList.get(0).getStyleId());
g2.setSize(zyStyleModelService.list(queryWrapperzsm).get(0).getModelNumber());
g2.setNum(orderGoodsList.get(0).getGoodsNum()+"");
g2.setPrice(orderGoodsList.get(0).getUnitPrice()+"");
//主辅料
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrappergf.eq("goods_id",orderGoodsList.get(0).getGoodsId());
List<GoodsFabric> listgf = goodsFabricService.list(queryWrappergf);
String zlstr = "";
for(int j = 0 ; j < listgf.size() ; j++){
zlstr = zlstr + zyFabricService.getById(listgf.get(j).getFabricId()).getName()+",";
}
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapperga.eq("goods_id",orderGoodsList.get(0).getGoodsId());
List<GoodsAccessories> listga = goodsAccessoriesService.list(queryWrapperga);
String flstr = "";
for(int k = 0 ; k < listga.size() ; k++){
flstr = flstr + zyAccessoriesService.getById(listga.get(k).getAccessoriesId()).getContents()+",";
}
g2.setMaterial(zlstr+flstr.substring(0,flstr.length()-1));
g2.setTotal(orderGoodsList.get(0).getPayTotalPrice()+"");
gr2.add(g2);
}
return Result.ok(gr2);
@ -1554,11 +1612,75 @@ public class SysUserController {
获取个人中心的订单详情
*/
@RequestMapping(value = "/getdingdaninfo", method = RequestMethod.GET)
public Result<?> findgoods(@RequestParam(name="id",required=true) String id) {
public Result<?> findgoods(@RequestParam(name="id",required=true) String id,HttpServletRequest req) {
//这个是获取订单的数据中的商品数据
Grzx1 g1 = new Grzx1();
g1 = sysUserService.getallg2(id);
ZyOrders zyOrders = zyOrdersService.getById(id);
g1.setId(zyOrders.getId());
g1.setOrdersNum(zyOrders.getOrdersNum());
OrderGoods orderGoods = new OrderGoods();
QueryWrapper<OrderGoods> queryWrapperogs = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap());
queryWrapperogs.eq("orders_id",zyOrders.getId());
List<OrderGoods> orderGoodsList = orderGoodsService.list(queryWrapperogs);
g1.setGoodsName(orderGoodsList.get(0).getGoodsName());
g1.setStyleNames(zyClothsStyleService.getById(orderGoodsList.get(0).getStyleId()).getStyleNames());
ZyStyleModel zyStyleModel = new ZyStyleModel();
QueryWrapper<ZyStyleModel> queryWrapperzsm = QueryGenerator.initQueryWrapper(zyStyleModel, req.getParameterMap());
queryWrapperzsm.eq("style_id",orderGoodsList.get(0).getStyleId());
g1.setModelNumber(zyStyleModelService.list(queryWrapperzsm).get(0).getModelNumber());
g1.setGoodsNum(orderGoodsList.get(0).getGoodsNum()+"");
GoodsFabric goodsFabric = new GoodsFabric();
QueryWrapper<GoodsFabric> queryWrappergf = QueryGenerator.initQueryWrapper(goodsFabric, req.getParameterMap());
queryWrappergf.eq("goods_id",orderGoodsList.get(0).getGoodsId());
List<GoodsFabric> listgf = goodsFabricService.list(queryWrappergf);
String zlstr = "";
for(int j = 0 ; j < listgf.size() ; j++){
zlstr = zlstr + zyFabricService.getById(listgf.get(j).getFabricId()).getName()+",";
}
GoodsAccessories goodsAccessories = new GoodsAccessories();
QueryWrapper<GoodsAccessories> queryWrapperga = QueryGenerator.initQueryWrapper(goodsAccessories, req.getParameterMap());
queryWrapperga.eq("goods_id",orderGoodsList.get(0).getGoodsId());
List<GoodsAccessories> listga = goodsAccessoriesService.list(queryWrapperga);
String flstr = "";
for(int k = 0 ; k < listga.size() ; k++){
flstr = flstr + zyAccessoriesService.getById(listga.get(k).getAccessoriesId()).getContents()+",";
}
g1.setName(zlstr+flstr.substring(0,flstr.length()-1));
g1.setDefaultPicture("http://localhost:10085/jeecg-boot/sys/common/static/"+orderGoodsList.get(0).getDefaultPicture());
g1.setPayTotalPrice(orderGoodsList.get(0).getPayTotalPrice()+"");
g1.setUnitPrice(orderGoodsList.get(0).getUnitPrice()+"");
g1.setCreateTime(zyOrders.getOrderTime());
g1.setCreateBy(sysUserService.getById(zyOrders.getUserId()).getRealname());
g1.setCityId(zyOrders.getCityId());
g1.setAddress(zyOrders.getAddress());
g1.setZipCode(zyOrders.getZipCode());
if (zyOrders.getDeliveryStatus()==0){
g1.setDeliveryStatus("未支付");
}
if (zyOrders.getDeliveryStatus()==1){
g1.setDeliveryStatus("已支付");
}
if (zyOrders.getDeliveryStatus()==2){
g1.setDeliveryStatus("待生产中");
}
if (zyOrders.getDeliveryStatus()==3){
g1.setDeliveryStatus("生产中");
}
if (zyOrders.getDeliveryStatus()==4){
g1.setDeliveryStatus("已发货");
}
if (zyOrders.getDeliveryStatus()==5){
g1.setDeliveryStatus("已到货");
}
if (zyOrders.getDeliveryStatus()==6){
g1.setDeliveryStatus("已签收");
}
if (zyOrders.getDeliveryStatus()==8){
g1.setDeliveryStatus("申请撤销");
}
if (zyOrders.getDeliveryStatus()==9){
g1.setDeliveryStatus("已撤销");
}
return Result.ok(g1);
}

@ -192,4 +192,8 @@ public interface SysUserMapper extends BaseMapper<SysUser> {
@Select("select id from customer_invoice where user_id =#{needuname}")
List<String> getuserfapiao(String needuname);
@Select("select id from customer_measure where user_id =#{needuname}")
List<String> getusermeasureId(String needuname);
}

@ -169,7 +169,7 @@
SELECT og.id, zo.orders_num , zg.goods_name , zcs.style_names,zsm.model_number,og.goods_num,zf.name,za.type_name,zg.default_picture,og.pay_total_price,og.unit_price,og.create_time,og.create_by ,
zo.delivery_status , zo.city_id ,zo.address,zo.zip_code,zo.user_id
FROM zy_orders AS zo
INNER JOIN order_goods AS og ON zo.id = og.orders_id
LEFT JOIN order_goods AS og ON zo.id = og.orders_id
LEFT JOIN zy_goods AS zg ON og.goods_id = zg.id
LEFT JOIN zy_cloths_style AS zcs ON og.style_id = zcs.id
LEFT JOIN zy_style_model AS zsm ON og.model_id = zsm.id

@ -580,11 +580,18 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
String needuname = sysUser.getId();
List<String> dizhi = userMapper.getuserdizhi(needuname);
List<String> fapiao = userMapper.getuserfapiao(needuname);
List<String> measureId = userMapper.getusermeasureId(needuname);
SysUserdfVO sdfvo = new SysUserdfVO();
sdfvo.setSysUser(sysUser);
sdfvo.setDizhi(dizhi);
sdfvo.setFapiao(fapiao);
System.out.println(sdfvo);
//量体
if(measureId.size()>0)
{
sdfvo.setMeasureId(measureId.get((measureId.size()-1)));
}
//System.out.println(sdfvo);
return sdfvo;
}

@ -29,7 +29,7 @@ public class Grzx1 {
private String unitPrice;
//创建时间
private String createTime;
private java.util.Date createTime;
//创建人
private String createBy;
//城市

@ -1,7 +1,10 @@
package org.jeecg.modules.system.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecgframework.poi.excel.annotation.Excel;
import java.util.List;
@ -10,4 +13,8 @@ public class SysUserdfVO {
private SysUser sysUser;
private List<String> fapiao;
private List<String> dizhi;
/**顾客量体id*/
@Excel (name = "顾客量体id", width = 15, dictTable = "customer_measure", dicText = "username", dicCode = "id")
@ApiModelProperty (value = "顾客量体id")
private java.lang.String measureId;
}

@ -9,6 +9,8 @@ import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.entity.WorkOrderVo;
import java.util.List;
/**
* @Description: 工单订单完工
* @Author: jeecg-boot
@ -24,4 +26,6 @@ public interface IWorkOrderService extends IService<WorkOrder> {
Result<?> paidan(ZyOrders zyOrders,String depId);
Result<?> cancellationWorkOrder(WorkOrder woModel);
List<String> jobPaidan(List<String> orderIds);
}

@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.demo.base.entity.ZyProcess;
import org.jeecg.modules.demo.base.mapper.ZyProcessMapper;
import org.jeecg.modules.demo.customermeasure.entity.CustomerMeasure;
import org.jeecg.modules.demo.customermeasure.mapper.CustomerMeasureMapper;
@ -44,6 +43,8 @@ import org.jeecg.modules.productprocessaccessories.entity.ProductProcessAccessor
import org.jeecg.modules.productprocessaccessories.mapper.ProductProcessAccessoriesMapper;
import org.jeecg.modules.productprocessfabric.entity.ProductProcessFabric;
import org.jeecg.modules.productprocessfabric.mapper.ProductProcessFabricMapper;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.mapper.SysDepartMapper;
import org.jeecg.modules.workorder.entity.WorkOrder;
import org.jeecg.modules.workorder.entity.WorkOrderVo;
import org.jeecg.modules.workorder.mapper.WorkOrderMapper;
@ -77,6 +78,10 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
@Autowired
private ZyOrdersMapper zyOrdersMapper;
//部门
@Autowired
private SysDepartMapper sysDepartMapper;
//订单商品
@Autowired
private OrderGoodsMapper orderGoodsMapper;
@ -151,8 +156,10 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
@Autowired
private ProductAccessoriesMapper productAccessoriesMapper;
//产品工序面料
@Autowired
private ProductProcessFabricMapper productProcessFabricMapper;
//产品工序辅料
@Autowired
private ProductProcessAccessoriesMapper productProcessAccessoriesMapper;
/**
@ -179,6 +186,8 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
QueryWrapper<OrderGoods> ogWrapper=new QueryWrapper<OrderGoods>();
ogWrapper.eq("orders_id",orderId);
List<OrderGoods> ogList=orderGoodsMapper.selectList(ogWrapper);
//工单
WorkOrder workOrder=new WorkOrder();
if(ogList.size()>0)
{//start if 02
// 保存工单
@ -212,7 +221,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
//生成工单
int goodNum=ogModel.getGoodsNum();
WorkOrder workOrder=new WorkOrder();
workOrder.setProductCode(CreateWorkCode(csModel.getNums(),smModel.getModelNumber()));//工单编号
workOrder.setOrdersId(orderId);//订单id
workOrder.setOrderGoodsId(ogModel.getId());// 订单商品
@ -269,7 +278,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
//#region 产品工序-添加(服装款式类型中读取)
//根据服务款式表id 得到服装工序,然后在得到基本工序
QueryWrapper<ZyStyleModular> styleModularLWrapper=new QueryWrapper<ZyStyleModular>();
styleModularLWrapper.eq("type_id",ogModel.getStyleId());
styleModularLWrapper.eq("style_id",ogModel.getStyleId());
List<ZyStyleModular> zyStyleModularList=styleModularMapper.selectList(styleModularLWrapper);
//将工序保存到产品工序中
@ -430,7 +439,7 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
//修改订单状态
zyOrders.setDeliveryStatus(3);
zyOrdersMapper.updateById(zyOrders);
return Result.OK("成功");
return Result.OK("成功",workOrder);
}
/**
@ -493,6 +502,35 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
return Result.OK("成功");
}
@Override
public List<String> jobPaidan(List<String> orderIds) {
//获取生产部门
QueryWrapper<SysDepart> queryWrapper=new QueryWrapper();
queryWrapper.eq("org_category",2);
List<SysDepart> sysDepList = sysDepartMapper.selectList(queryWrapper);
if(sysDepList.size()>0)
{
List<String> wordOderIds=new ArrayList<>();
//生产随机数,然后随机获取生产部门
int r=(int)Math.random() * sysDepList.size();
SysDepart dep=sysDepList.get(r);
for(String orderId:orderIds)
{
ZyOrders model=zyOrdersMapper.selectById(orderId);
Result result=this.paidan(model,dep.getId());
if (result.getCode().toString().equals("500"))
{
return null;
}
WorkOrder wo=(WorkOrder)result.getResult();
wordOderIds.add(wo.getId());
}
return wordOderIds;
}
return null;
}
//生成工单编号
@ -532,4 +570,6 @@ public class WorkOrderServiceImpl extends ServiceImpl<WorkOrderMapper, WorkOrder
String produceCode = workCode+substr+str;
return produceCode;
}
}

Loading…
Cancel
Save