喻忠伟 2 years ago
commit 2e59978ba2
  1. 46
      ant-design-vue-jeecg/src/views/shopping/pages/gerenzhongxin.vue
  2. 426
      ant-design-vue-jeecg/src/views/shopping/pages/orderDetails.vue
  3. 158
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/controller/SysUserController.java
  4. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/mapper/xml/SysUserMapper.xml
  5. 2
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/system/vo/Grzx1.java

@ -160,8 +160,15 @@
<span>订单编号{{item.orderNum}}</span> <span>订单编号{{item.orderNum}}</span>
<span> <span>
<a class="delete">删除</a> <a class="delete">删除</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">已支付</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> </span>
</div> </div>
<div class="bottom d-flex"> <div class="bottom d-flex">
@ -178,8 +185,8 @@
<p class="heji d-flex"> <p class="heji d-flex">
<span class="f_20 c_1B">总计¥ {{item.total}}</span> <span class="f_20 c_1B">总计¥ {{item.total}}</span>
<span class="f_16 c_333 "> <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.pay==='0'" @click="ljzf(item)">立即支付</a>
<a class="btn ljzf" v-if="!item.receipt && item.pay">确认收货</a> <a class="btn ljzf" v-if="!item.receipt && item.pay==='5'">确认收货</a>
<a class="btn ckxq" @click="openDetail(item)">查看详情</a> <a class="btn ckxq" @click="openDetail(item)">查看详情</a>
</span> </span>
</p> </p>
@ -404,6 +411,7 @@
getAction(this.url.findgoods).then((res) => { getAction(this.url.findgoods).then((res) => {
if(res.success) { if(res.success) {
this.allOrders2 = res.result; this.allOrders2 = res.result;
this.allOrders = res.result;
this.visible = true; this.visible = true;
} else { } else {
} }
@ -449,12 +457,24 @@
openDetail(item) { openDetail(item) {
console.log('item') console.log('item')
console.log(item) console.log(item)
if(item.pay == false){ if(item.pay ==='0'){
this.key = 'daizhifu' this.key = 'wzf'
}else if(item.pay == true && item.receipt == false){ }else if(item.pay ==='1' ){
this.key = 'daishouhuo' this.key = 'yzf'
}else if(item.receipt == true){ }else if(item.pay =='2'){
this.key = 'yiwancheng' 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({ this.$router.push({
path: "/shopping/order", path: "/shopping/order",
@ -485,17 +505,17 @@
} }
else if(key.key == 'daizhifu'){ else if(key.key == 'daizhifu'){
/* this.allOrders = this.allOrders1.filter(item=>item.pay == false)*/ /* 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=[] this.invoiceList=[]
} }
else if(key.key == 'daishouhuo'){ else if(key.key == 'daishouhuo'){
/*this.allOrders = this.allOrders1.filter(item=>item.receipt == false && item.pay == true)*/ /*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=[] this.invoiceList=[]
} }
else if(key.key == 'yiwancheng'){ else if(key.key == 'yiwancheng'){
/*this.allOrders = this.allOrders1.filter(item=>item.receipt == true)*/ /*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=[] this.invoiceList=[]
}else if(key.key == 'invoice1'){// }else if(key.key == 'invoice1'){//
this.invoiceList = this.invoiceList1 this.invoiceList = this.invoiceList1

@ -1,5 +1,5 @@
<template> <template>
<!-- 订单详情--> <!-- 订单详情-->
<div class="orderDetails"> <div class="orderDetails">
<Header fontColor="#000"></Header> <Header fontColor="#000"></Header>
<div style="padding-top: 88px"></div> <div style="padding-top: 88px"></div>
@ -13,38 +13,61 @@
<div class="d-flex"> <div class="d-flex">
<div class="l"> <div class="l">
<div class="card"> <div class="card">
<p class="f_24" v-if="!this.model.pay">待支付</p> <!-- <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 && this.model.pay">待收货</p>
<p class="f_24" v-if="this.model.receipt">已完成</p> <p class="f_24" v-if="this.model.receipt">已完成</p>
<!-- <a class="c_333 f_12" v-if="this.model.receipt" @click="showModal">查看发票详情</a>--> <a class="c_333 f_12" v-if="this.model.receipt">查看发票详情</a>-->
<a class="c_333 f_12" @click="showModal">申请发票</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>
<div class="steps"> <div class="steps">
<a-steps direction="vertical" size="small" :current="current"> <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-icon slot="icon" type="container" />
</a-step> </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-icon slot="icon" type="credit-card" />
</a-step> </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-icon slot="icon" type="rocket" />
</a-step> </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-icon slot="icon" type="reconciliation" />
</a-step> </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-icon slot="icon" type="car" />
</a-step> </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-icon slot="icon" type="home" />
</a-step> </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-icon slot="icon" type="printer" />
</a-step> </a-step>
@ -53,17 +76,27 @@
</div> </div>
<div class="r"> <div class="r">
<div class="title d-flex"> <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 class="right d-flex f_16"><span>数量</span><span>价格</span><span>总计</span></div>
</div> </div>
<div class="d-flex orderDiv"> <div class="d-flex orderDiv">
<div class="orderAddr"> <div class="orderAddr">
<p class="headline">配送至</p> <p class="headline">配送至</p>
<p class="text">河南省</p> <a-button
<p class="text">驻马店市 驿城区</p> class="defaultAddr"
<p class="text">{{this.dingdandh.address}}</p> style="padding-top: 10px;word-wrap: break-word;
<p class="text">{{this.dingdandh.zipCode}}</p>
<p class="headline">{{this.dingdandh.deliveryStatus}}</p> 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="text">您的订单已经发出</p>
<p class="headline">尊享免费配送您的物流单号</p> <p class="headline">尊享免费配送您的物流单号</p>
<p class="text">4263882788397</p> <p class="text">4263882788397</p>
@ -71,13 +104,13 @@
<div class="orderList "> <div class="orderList ">
<div class="item d-flex"> <div class="item d-flex">
<div class="img"> <div class="img">
<img src="{this.dingdaninfo.defaultPicture}"> <img :src="defaultPicture">
</div> </div>
<div class="info"> <div class="info">
<p class="f_14 c_333 headline">{{this.dingdaninfo.goodsName}}</p> <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.styleNames}}</span></p>
<p class="d-flex">尺码<span>{{this.dingdaninfo.modelNumber}}</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>
<div class="right d-flex f_14 c_333"> <div class="right d-flex f_14 c_333">
<span>{{this.dingdaninfo.goodsNum}}</span><span>{{this.dingdaninfo.unitPrice}}</span><span>{{this.dingdaninfo.payTotalPrice}}</span> <span>{{this.dingdaninfo.goodsNum}}</span><span>{{this.dingdaninfo.unitPrice}}</span><span>{{this.dingdaninfo.payTotalPrice}}</span>
@ -118,7 +151,10 @@
</div> </div>
</div> </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 <a-modal
title="发票申请" title="发票申请"
:visible="visible2" :visible="visible2"
@ -208,6 +244,40 @@
</a-form-model> </a-form-model>
</template> </template>
</a-modal> </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>
</div> </div>
<Footer></Footer> <Footer></Footer>
@ -222,17 +292,21 @@
components: { Header,Footer }, components: { Header,Footer },
data() { data() {
return { return {
current:0,//
visible2:false, visible2:false,
visible3:false,
cityId:"",
description:"",
defaultPicture:"",
current:0,//
model:{ model:{
id:'', id:'',
orderNum:'', orderNum:'',
name:'', name:'',
pay:false, pay:'',
receipt:false receipt:false
}, },
dingdaninfo:{}, dingdaninfo:{},
dingdandh:{}, dingdandh:{},
labelCol: { span: 5 }, labelCol: { span: 5 },
wrapperCol: { span: 19 }, wrapperCol: { span: 19 },
form: { form: {
@ -259,22 +333,40 @@
}, },
created() { created() {
this.getallgoods(); this.getallgoods();
this.getdingdandh(); //this.getdingdandh();
this.model.id = this.$route.query.id this.model.id = this.$route.query.id
this.model.orderNum = this.$route.query.orderNum this.model.orderNum = this.$route.query.orderNum
this.model.name = this.$route.query.name //this.model.name = this.$route.query.name
this.model.pay = JSON.parse(this.$route.query.pay) this.model.pay = this.$route.query.pay
this.model.receipt = JSON.parse(this.$route.query.receipt) this.model.receipt = JSON.parse(this.$route.query.receipt)
switch (this.$route.query.key) { switch (this.$route.query.key) {
case 'daizhifu': case 'wzf':
this.current=0 this.current=0
break; 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 this.current=4
break; break;
case 'yiwancheng': case 'ydh':
this.current=5
break;
case 'yqs':
this.current=6 this.current=6
break; break;
case 'sqcx':
this.current=7
break;
case 'ycx':
this.current=8
break;
} }
@ -285,7 +377,12 @@
}, },
methods: { methods: {
ljgm(){
this.visible3 = true
},
zhifu() {
},
getdingdandh(){ getdingdandh(){
getAction(this.url.getdingdandh,{ id: this.$route.query.id}).then((res) => { getAction(this.url.getdingdandh,{ id: this.$route.query.id}).then((res) => {
if(res.success) { if(res.success) {
@ -306,6 +403,9 @@
getAction(this.url.getdingdaninfo,{ id: this.$route.query.id}).then((res) => { getAction(this.url.getdingdaninfo,{ id: this.$route.query.id}).then((res) => {
if(res.success) { if(res.success) {
this.dingdaninfo = res.result; this.dingdaninfo = res.result;
this.defaultPicture = this.dingdaninfo.defaultPicture;
this.description=this.dingdaninfo.createTime;
this.cityId = this.dingdaninfo.cityId;
this.visible = true; this.visible = true;
} else { } else {
console.log("+++++++++++++++++++++") console.log("+++++++++++++++++++++")
@ -321,6 +421,10 @@
handleCancel(e) { handleCancel(e) {
this.visible2 = false; this.visible2 = false;
}, },
handleCancel2(e) {
this.visible3 = false;
},
}, },
@ -333,155 +437,169 @@
} }
</style> </style>
<style lang="less" scoped> <style lang="less" scoped>
@import '../assets/common.css'; .j-area-linkage /deep/ .area-select{
.orderMain{ background-color: #fff;
background: #F6F6F6; border: none;
padding-bottom: 100px; span{
.jz{ padding-left: 0;
.breadcrumb{ font-size: 12px;
padding-top: 50px; color:#313131;
padding-bottom: 50px; cursor:auto;
font-weight: 500;
}
i{
display: none;
} }
.d-flex{ }
justify-content: space-between; @import '../assets/common.css';
.l{ .orderMain{
width: 300px; background: #F6F6F6;
.card{ padding-bottom: 100px;
.jz{
.breadcrumb{
padding-top: 50px;
padding-bottom: 50px;
}
.d-flex{
justify-content: space-between;
.l{
width: 300px; width: 300px;
height: 157px; .card{
background: #FFFFFF; width: 300px;
margin-bottom: 20px; height: 157px;
text-align: center; background: #FFFFFF;
padding-top: 40px;
.f_24{
color: #C8A985;
margin-bottom: 20px; margin-bottom: 20px;
} text-align: center;
.f_12{ padding-top: 40px;
padding: 5px 14px; .f_24{
border: 1px solid #333333;
}
}
.steps{
width: 300px;
height: 736px;
background: #FFFFFF;
padding: 32px 55px;
}
}
.r{
width: 1110px;
height: 913px;
background: #FFFFFF;
padding: 54px 48px;
.title{
padding-bottom: 15px;
border-bottom: 1px solid #DADADA;
.line{
margin-left: 10px;
margin-right: 10px;
}
.right{
width: 25%;
span{
color: #C8A985; color: #C8A985;
margin-bottom: 20px;
}
.f_12{
padding: 5px 14px;
border: 1px solid #333333;
} }
} }
} .steps{
.orderDiv{ width: 300px;
padding-bottom: 20px; height: 736px;
border-bottom: 1px solid #DADADA; background: #FFFFFF;
.orderAddr{ padding: 32px 55px;
width: 25%;
color: #333;
font-size: 16px;
p{
margin-bottom: 10px;
}
.headline{
font-weight: 500;
color: #C8A985;
margin-top: 30px;
}
.text{
font-weight: 400;
} }
} }
.orderList{ .r{
width: 75%; width: 1110px;
.item{ height: 913px;
padding-top: 30px; background: #FFFFFF;
padding: 54px 48px;
.title{
padding-bottom: 15px;
border-bottom: 1px solid #DADADA; border-bottom: 1px solid #DADADA;
&:last-of-type{ .line{
border: none; margin-left: 10px;
margin-right: 10px;
} }
.img{ .right{
width: 23.33%; width: 25%;
img{ span{
width: 180px; color: #C8A985;
height: 180px;
} }
} }
.info{ }
width: 43.33%; .orderDiv{
padding-right: 15px; padding-bottom: 20px;
border-bottom: 1px solid #DADADA;
.orderAddr{
width: 25%;
color: #333;
font-size: 16px;
p{
margin-bottom: 10px;
}
.headline{ .headline{
font-weight: 500; font-weight: 500;
color: #C8A985;
margin-top: 30px;
} }
p{ .text{
span{ font-weight: 400;
margin-left: 10px;
display: inline-block;
width: 75%;
}
} }
} }
.right{ .orderList{
width: 33.33%; width: 75%;
font-weight: 500; .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{ .heji{
padding: 30px 20px; padding: 30px 20px;
p{ p{
span{ span{
width: 20%; width: 20%;
color: #333; color: #333;
} }
.leftSide{ .leftSide{
text-align: left; text-align: left;
} }
.midst{ .midst{
text-align: center; text-align: center;
} }
.rightSide{ .rightSide{
text-align: right; 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> </style>

@ -28,9 +28,20 @@ import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.system.util.JwtUtil; import org.jeecg.common.system.util.JwtUtil;
import org.jeecg.common.system.vo.LoginUser; import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.common.util.*; 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.entity.CollectType;
import org.jeecg.modules.demo.collecttype.service.ICollectTypeService; 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.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.orderbymakeclothplan.service.ZyOrderService;
import org.jeecg.modules.system.entity.*; import org.jeecg.modules.system.entity.*;
import org.jeecg.modules.system.model.DepartIdModel; 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.entity.Station;
import org.jeecg.modules.team.service.IGroupxService; import org.jeecg.modules.team.service.IGroupxService;
import org.jeecg.modules.team.service.IStationService; 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.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams; import org.jeecgframework.poi.excel.entity.ExportParams;
@ -112,6 +126,8 @@ public class SysUserController {
@Autowired @Autowired
private IGroupxService iGroupxService; private IGroupxService iGroupxService;
@Autowired
private IZyOrdersService zyOrdersService;
@Value("${jeecg.path.upload}") @Value("${jeecg.path.upload}")
@ -120,6 +136,21 @@ public class SysUserController {
@Resource @Resource
private BaseCommonService baseCommonService; 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 * @return
*/ */
@RequestMapping(value = "/findgoods", method = RequestMethod.GET) @RequestMapping(value = "/findgoods", method = RequestMethod.GET)
public Result<?> findgoods() { public Result<?> findgoods(HttpServletRequest req) {
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal(); LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
String userid = loginUser.getId(); 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<>(); List<Grzx2> gr2 = new ArrayList<>();
gr1 =sysUserService.getallgr1(userid); for(int i = 0 ; i < zyOrdersList.size(); i++){
for (int i=0;i<gr1.size();i++){
Grzx2 g2 = new Grzx2(); Grzx2 g2 = new Grzx2();
g2.setId(gr1.get(i).getId()); g2.setId(zyOrdersList.get(i).getId());
g2.setOrderNum(gr1.get(i).getOrdersNum()); g2.setOrderNum(zyOrdersList.get(i).getOrdersNum());
g2.setPay(gr1.get(i).getDeliveryStatus()); g2.setPay(zyOrdersList.get(i).getDeliveryStatus()+"");
g2.setReceipt("false"); g2.setReceipt("false");
g2.setUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+gr1.get(i).getDefaultPicture()); OrderGoods orderGoods = new OrderGoods();
g2.setName(gr1.get(i).getGoodsName()); QueryWrapper<OrderGoods> queryWrapperogs = QueryGenerator.initQueryWrapper(orderGoods, req.getParameterMap());
g2.setType(gr1.get(i).getStyleNames()); queryWrapperogs.eq("orders_id",zyOrdersList.get(i).getId());
g2.setSize(gr1.get(i).getModelNumber()); List<OrderGoods> orderGoodsList = orderGoodsService.list(queryWrapperogs);
g2.setNum(gr1.get(i).getGoodsNum()); g2.setUrl("http://localhost:10085/jeecg-boot/sys/common/static/"+orderGoodsList.get(0).getDefaultPicture());
g2.setPrice(gr1.get(i).getUnitPrice()); g2.setName(orderGoodsList.get(0).getGoodsName());
g2.setMaterial(gr1.get(i).getName()+","+gr1.get(i).getTypeName()); g2.setType(zyClothsStyleService.getById(orderGoodsList.get(0).getStyleId()).getStyleNames());
g2.setTotal(gr1.get(i).getPayTotalPrice()); 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); gr2.add(g2);
} }
return Result.ok(gr2); return Result.ok(gr2);
@ -1554,11 +1612,75 @@ public class SysUserController {
获取个人中心的订单详情 获取个人中心的订单详情
*/ */
@RequestMapping(value = "/getdingdaninfo", method = RequestMethod.GET) @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(); 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); return Result.ok(g1);
} }

@ -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 , 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 zo.delivery_status , zo.city_id ,zo.address,zo.zip_code,zo.user_id
FROM zy_orders AS zo 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_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_cloths_style AS zcs ON og.style_id = zcs.id
LEFT JOIN zy_style_model AS zsm ON og.model_id = zsm.id LEFT JOIN zy_style_model AS zsm ON og.model_id = zsm.id

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

Loading…
Cancel
Save