master
喻忠伟 2 years ago
parent 43200f64b4
commit a1aff53bf3
  1. 928
      ant-design-vue-jeecg/src/views/zyWorkorderManagement/ZyProductionOrderList.vue
  2. 2
      jeecg-boot/jeecg-boot-module-orderbymakeclothplan/src/main/java/org/jeecg/modules/orderbymakeclothplan/controller/ZyOrderController.java
  3. 16
      jeecg-boot/jeecg-boot-module-orderbymakeclothplan/src/main/java/org/jeecg/modules/orderbymakeclothplan/service/impl/ZyOrderServiceImpl.java
  4. 4
      jeecg-boot/jeecg-boot-module-shop/src/main/java/org/jeecg/modules/shop/Service/impl/ZyShopServiceImpl.java
  5. 6
      jeecg-boot/jeecg-boot-module-shop/src/main/java/org/jeecg/modules/shop/mapper/xml/ZyShopMapper.xml
  6. 412
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/entity/ZyOrders.java
  7. 42
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/mapper/xml/ZyOrdersMapper.xml
  8. 682
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/demo/zyorders/service/impl/ZyOrdersServiceImpl.java
  9. 27
      jeecg-boot/jeecg-boot-module-system/src/main/java/org/jeecg/modules/largeScreen/LargeScreenController.java

@ -1,465 +1,465 @@
<template> <template>
<a-card :bordered="false"> <a-card :bordered="false">
<!-- 查询区域 --> <!-- 查询区域 -->
<div class="table-page-search-wrapper"> <div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery"> <a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24"> <a-row :gutter="24">
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="是否子单">--> <!--<a-form-item label="是否子单">-->
<!--<j-dict-select-tag placeholder="请选择是否子单" v-model="queryParam.ischild" dictCode="ischild"/>--> <!--<j-dict-select-tag placeholder="请选择是否子单" v-model="queryParam.ischild" dictCode="ischild"/>-->
<!--</a-form-item>--> <!--</a-form-item>-->
<!--</a-col>--> <!--</a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="订单编号"> <a-form-item label="订单编号">
<a-input placeholder="请输入订单编号" v-model="queryParam.ordersNum"></a-input> <a-input placeholder="请输入订单编号" v-model="queryParam.ordersNum"></a-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="订单类型"> <a-form-item label="订单类型">
<j-dict-select-tag placeholder="请选择订单类型" v-model="queryParam.ordersType" dictCode="orders_type"/> <j-dict-select-tag placeholder="请选择订单类型" v-model="queryParam.ordersType" dictCode="orders_type"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="支付方式">--> <!--<a-form-item label="支付方式">-->
<!--<j-dict-select-tag placeholder="请选择支付方式" v-model="queryParam.paymentMethod" dictCode="payment_method"/>--> <!--<j-dict-select-tag placeholder="请选择支付方式" v-model="queryParam.paymentMethod" dictCode="payment_method"/>-->
<!--</a-form-item>--> <!--</a-form-item>-->
<!--</a-col>--> <!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="支付状态">--> <!--<a-form-item label="支付状态">-->
<!--<j-dict-select-tag placeholder="请选择支付状态" v-model="queryParam.paymentStatus" dictCode="payment_status"/>--> <!--<j-dict-select-tag placeholder="请选择支付状态" v-model="queryParam.paymentStatus" dictCode="payment_status"/>-->
<!--</a-form-item>--> <!--</a-form-item>-->
<!--</a-col>--> <!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="账号/卡号">--> <!--<a-form-item label="账号/卡号">-->
<!--<a-input placeholder="请输入账号/卡号" v-model="queryParam.accountNo"></a-input>--> <!--<a-input placeholder="请输入账号/卡号" v-model="queryParam.accountNo"></a-input>-->
<!--</a-form-item>--> <!--</a-form-item>-->
<!--</a-col>--> <!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="城市">--> <!--<a-form-item label="城市">-->
<!--<j-area-linkage type="cascader" v-model="queryParam.cityId" placeholder="请选择省市区"/>--> <!--<j-area-linkage type="cascader" v-model="queryParam.cityId" placeholder="请选择省市区"/>-->
<!--</a-form-item>--> <!--</a-form-item>-->
<!--</a-col>--> <!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="发票客户类型">--> <!--<a-form-item label="发票客户类型">-->
<!--<j-dict-select-tag placeholder="请选择发票客户类型" v-model="queryParam.invoiceCustomerType" dictCode="invoice_customer_type"/>--> <!--<j-dict-select-tag placeholder="请选择发票客户类型" v-model="queryParam.invoiceCustomerType" dictCode="invoice_customer_type"/>-->
<!--</a-form-item>--> <!--</a-form-item>-->
<!--</a-col>--> <!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="发票类型">--> <!--<a-form-item label="发票类型">-->
<!--<j-dict-select-tag placeholder="请选择发票类型" v-model="queryParam.invoiceType" dictCode="invoice_type"/>--> <!--<j-dict-select-tag placeholder="请选择发票类型" v-model="queryParam.invoiceType" dictCode="invoice_type"/>-->
<!--</a-form-item>--> <!--</a-form-item>-->
<!--</a-col>--> <!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="公户账号">--> <!--<a-form-item label="公户账号">-->
<!--<a-input placeholder="请输入公户账号" v-model="queryParam.accountNumber"></a-input>--> <!--<a-input placeholder="请输入公户账号" v-model="queryParam.accountNumber"></a-input>-->
<!--</a-form-item>--> <!--</a-form-item>-->
<!--</a-col>--> <!--</a-col>-->
<!--<a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!--<a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!--<a-form-item label="物流企业">--> <!--<a-form-item label="物流企业">-->
<!--<j-select-depart placeholder="请选择物流企业" v-model="queryParam.logisticsEnterprisesId"/>--> <!--<j-select-depart placeholder="请选择物流企业" v-model="queryParam.logisticsEnterprisesId"/>-->
<!--</a-form-item>--> <!--</a-form-item>-->
<!--</a-col>--> <!--</a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="交付状态"> <a-form-item label="交付状态">
<j-dict-select-tag placeholder="请选择交付状态" v-model="queryParam.deliveryStatus" dictCode="delivery_status"/> <j-dict-select-tag placeholder="请选择交付状态" v-model="queryParam.deliveryStatus" dictCode="delivery_status"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span> </span>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<!-- 查询区域-END --> <!-- 查询区域-END -->
<!-- 操作按钮区域 --> <!-- 操作按钮区域 -->
<div class="table-operator"> <div class="table-operator">
<!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>--> <!--<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>-->
<!--<a-button type="primary" icon="download" @click="handleExportXls('订单基本信息管理')">导出</a-button>--> <!--<a-button type="primary" icon="download" @click="handleExportXls('订单基本信息管理')">导出</a-button>-->
<!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">--> <!--<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!--<a-button type="primary" icon="import">导入</a-button>--> <!--<a-button type="primary" icon="import">导入</a-button>-->
<!--</a-upload>--> <!--</a-upload>-->
<!--&lt;!&ndash; 高级查询区域 &ndash;&gt;--> <!--&lt;!&ndash; 高级查询区域 &ndash;&gt;-->
<!--<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> <!--<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<!--<a-dropdown v-if="selectedRowKeys.length > 0">--> <!--<a-dropdown v-if="selectedRowKeys.length > 0">-->
<!--<a-menu slot="overlay">--> <!--<a-menu slot="overlay">-->
<!--<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>--> <!--<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>-->
<!--</a-menu>--> <!--</a-menu>-->
<!--<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>--> <!--<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>-->
<!--</a-dropdown>--> <!--</a-dropdown>-->
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
<div> <div>
<!--<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">--> <!--<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">-->
<!--<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>--> <!--<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>-->
<!--<a style="margin-left: 24px" @click="onClearSelected">清空</a>--> <!--<a style="margin-left: 24px" @click="onClearSelected">清空</a>-->
<!--</div>--> <!--</div>-->
<a-table <a-table
ref="table" ref="table"
size="middle" size="middle"
:scroll="{x:true}" :scroll="{x:true}"
bordered bordered
rowKey="id" rowKey="id"
:columns="columns" :columns="columns"
:dataSource="dataSource" :dataSource="dataSource"
:pagination="ipagination" :pagination="ipagination"
:loading="loading" :loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap" class="j-table-force-nowrap"
@change="handleTableChange"> @change="handleTableChange">
<template slot="htmlSlot" slot-scope="text"> <template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div> <div v-html="text"></div>
</template> </template>
<template slot="imgSlot" slot-scope="text"> <template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> <img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template> </template>
<template slot="pcaSlot" slot-scope="text"> <template slot="pcaSlot" slot-scope="text">
<div>{{ getPcaText(text) }}</div> <div>{{ getPcaText(text) }}</div>
</template> </template>
<template slot="fileSlot" slot-scope="text"> <template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button <a-button
v-else v-else
:ghost="true" :ghost="true"
type="primary" type="primary"
icon="download" icon="download"
size="small" size="small"
@click="downloadFile(text)"> @click="downloadFile(text)">
下载 下载
</a-button> </a-button>
</template> </template>
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a v-if="record.deliveryStatus==2" @click="paidan(record)">派单</a> <a v-if="record.deliveryStatus==2" @click="paidan(record)">派单</a>
<a-divider v-if="record.deliveryStatus==2" type="vertical" /> <a-divider v-if="record.deliveryStatus==2" type="vertical" />
<!--<a @click="handleEdit(record)">编辑</a>--> <!--<a @click="handleEdit(record)">编辑</a>-->
<!--<a-divider type="vertical" />--> <!--<a-divider type="vertical" />-->
<a @click="handleDetail(record)">详情</a> <a @click="handleDetail(record)">详情</a>
<a-divider type="vertical" /> <a-divider type="vertical" />
<!--<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">--> <!--<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
<!--<a>删除</a>--> <!--<a>删除</a>-->
<!--</a-popconfirm>--> <!--</a-popconfirm>-->
</span> </span>
</a-table> </a-table>
</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"/> <j-select-production-dep ref="productionForm" @ok="paidanFormOk"/>
</a-card> </a-card>
</template> </template>
<script> <script>
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
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 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'
export default { export default {
name: 'ZyProductionOrderList', name: 'ZyProductionOrderList',
mixins:[JeecgListMixin, mixinDevice], mixins:[JeecgListMixin, mixinDevice],
components: { components: {
ZyOrdersModal, ZyOrdersModal,
JSelectProductionDep JSelectProductionDep
}, },
data () { data () {
return { return {
description: '派单订单基本信息管理页面', description: '派单订单基本信息管理页面',
// //
columns: [ columns: [
{ {
title: '#', title: '#',
dataIndex: '', dataIndex: '',
key:'rowIndex', key:'rowIndex',
width:60, width:60,
align:"center", align:"center",
customRender:function (t,r,index) { customRender:function (t,r,index) {
return parseInt(index)+1; return parseInt(index)+1;
} }
}, },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'ischild_dictText' // dataIndex: 'ischild_dictText'
// }, // },
{ {
title:'订单编号', title:'订单编号',
align:"center", align:"center",
dataIndex: 'ordersNum' dataIndex: 'ordersNum'
}, },
{ {
title:'下单时间', title:'下单时间',
align:"center", align:"center",
dataIndex: 'orderTime', dataIndex: 'orderTime',
customRender:function (text) { customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text) return !text?"":(text.length>10?text.substr(0,10):text)
} }
}, },
// { // {
// title:'()', // title:'()',
// align:"center", // align:"center",
// dataIndex: 'money' // dataIndex: 'money'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'freight' // dataIndex: 'freight'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'promotionPrice' // dataIndex: 'promotionPrice'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'actualPayment' // dataIndex: 'actualPayment'
// }, // },
{ {
title:'交货期(天)', title:'交货期(天)',
align:"center", align:"center",
dataIndex: 'deliveryTime' dataIndex: 'deliveryTime'
}, },
{ {
title:'订单类型', title:'订单类型',
align:"center", align:"center",
dataIndex: 'ordersType_dictText' dataIndex: 'ordersType_dictText'
}, },
{ {
title:'客户', title:'客户',
align:"center", align:"center",
dataIndex: 'userId_dictText' dataIndex: 'userId_dictText'
}, },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'goodsQuantity' // dataIndex: 'goodsQuantity'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'paymentMethod_dictText' // dataIndex: 'paymentMethod_dictText'
// }, // },
{ {
title:'支付状态', title:'支付状态',
align:"center", align:"center",
dataIndex: 'paymentStatus_dictText' dataIndex: 'paymentStatus_dictText'
}, },
// { // {
// title:'/', // title:'/',
// align:"center", // align:"center",
// dataIndex: 'accountNo' // dataIndex: 'accountNo'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'bankDeposit' // dataIndex: 'bankDeposit'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'paymentTime', // dataIndex: 'paymentTime',
// customRender:function (text) { // customRender:function (text) {
// return !text?"":(text.length>10?text.substr(0,10):text) // return !text?"":(text.length>10?text.substr(0,10):text)
// } // }
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'cityId', // dataIndex: 'cityId',
// scopedSlots: {customRender: 'pcaSlot'} // scopedSlots: {customRender: 'pcaSlot'}
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'address' // dataIndex: 'address'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'zipCode' // dataIndex: 'zipCode'
// }, // },
{ // {
title:'收货人', // title:'',
align:"center", // align:"center",
dataIndex: 'receiver_dictText' // dataIndex: 'receiver_dictText'
}, // },
{ // {
title:'联系电话', // title:'',
align:"center", // align:"center",
dataIndex: 'mobile' // dataIndex: 'mobile'
}, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'invoiceCustomerType_dictText' // dataIndex: 'invoiceCustomerType_dictText'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'invoiceType_dictText' // dataIndex: 'invoiceType_dictText'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'taxIdentificationNumber' // dataIndex: 'taxIdentificationNumber'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'addressBilling' // dataIndex: 'addressBilling'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'telephone' // dataIndex: 'telephone'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'bankPublic' // dataIndex: 'bankPublic'
// }, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'accountNumber' // dataIndex: 'accountNumber'
// }, // },
{ {
title:'销售门店', title:'销售门店',
align:"center", align:"center",
dataIndex: 'salesEnterpriseId_dictText' dataIndex: 'salesEnterpriseId_dictText'
}, },
{ // {
title:'销售员', // title:'',
align:"center", // align:"center",
dataIndex: 'salespersonId_dictText' // dataIndex: 'salespersonId_dictText'
}, // },
// { // {
// title:'', // title:'',
// align:"center", // align:"center",
// dataIndex: 'logisticsEnterprisesId_dictText' // dataIndex: 'logisticsEnterprisesId_dictText'
// }, // },
{ {
title:'交付状态', title:'交付状态',
align:"center", align:"center",
dataIndex: 'deliveryStatus_dictText' dataIndex: 'deliveryStatus_dictText'
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
align:"center", align:"center",
fixed:"right", fixed:"right",
width:147, width:147,
scopedSlots: { customRender: 'action' } scopedSlots: { customRender: 'action' }
} }
], ],
url: { url: {
list: "/workOrder/workOrder/productionlist", list: "/workOrder/workOrder/productionlist",
delete: "/zyorders/zyOrders/delete", delete: "/zyorders/zyOrders/delete",
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:{},
pcaData:'', pcaData:'',
superFieldList:[], superFieldList:[],
} }
}, },
created() { created() {
this.pcaData = new Area() this.pcaData = new Area()
this.getSuperFieldList(); this.getSuperFieldList();
}, },
computed: { computed: {
importExcelUrl: function(){ importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}, },
}, },
methods: { methods: {
paidan(record){ paidan(record){
this.$refs.productionForm.showModal(record.id,record.ordersNum+"订单派单管理") this.$refs.productionForm.showModal(record.id,record.ordersNum+"订单派单管理")
// getAction(this.url.paidan,{id:record.id}).then((res) => { // getAction(this.url.paidan,{id:record.id}).then((res) => {
// if (res.success) { // if (res.success) {
// this.$message.success(""); // this.$message.success("");
// this.loadData(); // this.loadData();
// }else{ // }else{
// this.$message.error(res.message); // this.$message.error(res.message);
// } // }
// }) // })
}, },
paidanFormOk(orderId,depId) { paidanFormOk(orderId,depId) {
// / // /
getAction(this.url.paidan,{'orderId':orderId,'depId':depId}).then((res) => { 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();
}else{ }else{
this.$message.error(res.message); this.$message.error(res.message);
} }
}) })
}, },
getPcaText(code){ getPcaText(code){
return this.pcaData.getText(code); return this.pcaData.getText(code);
}, },
initDictConfig(){ initDictConfig(){
}, },
getSuperFieldList(){ getSuperFieldList(){
let fieldList=[]; let fieldList=[];
fieldList.push({type:'int',value:'ischild',text:'是否子单',dictCode:'ischild'}) fieldList.push({type:'int',value:'ischild',text:'是否子单',dictCode:'ischild'})
fieldList.push({type:'string',value:'orderId',text:'原订单',dictCode:'zy_orders,orders_num,id'}) fieldList.push({type:'string',value:'orderId',text:'原订单',dictCode:'zy_orders,orders_num,id'})
fieldList.push({type:'date',value:'orderTime',text:'下单时间'}) fieldList.push({type:'date',value:'orderTime',text:'下单时间'})
fieldList.push({type:'string',value:'ordersNum',text:'订单编号',dictCode:''}) fieldList.push({type:'string',value:'ordersNum',text:'订单编号',dictCode:''})
fieldList.push({type:'double',value:'money',text:'总金额',dictCode:''}) fieldList.push({type:'double',value:'money',text:'总金额',dictCode:''})
fieldList.push({type:'double',value:'freight',text:'运费',dictCode:''}) fieldList.push({type:'double',value:'freight',text:'运费',dictCode:''})
fieldList.push({type:'double',value:'promotionPrice',text:'促销',dictCode:''}) fieldList.push({type:'double',value:'promotionPrice',text:'促销',dictCode:''})
fieldList.push({type:'double',value:'actualPayment',text:'实付款',dictCode:''}) fieldList.push({type:'double',value:'actualPayment',text:'实付款',dictCode:''})
fieldList.push({type:'int',value:'deliveryTime',text:'交货期',dictCode:''}) fieldList.push({type:'int',value:'deliveryTime',text:'交货期',dictCode:''})
fieldList.push({type:'int',value:'ordersType',text:'订单类型',dictCode:'orders_type'}) fieldList.push({type:'int',value:'ordersType',text:'订单类型',dictCode:'orders_type'})
fieldList.push({type:'sel_user',value:'userId',text:'顾客'}) fieldList.push({type:'sel_user',value:'userId',text:'顾客'})
fieldList.push({type:'int',value:'goodsQuantity',text:'商品条目数量',dictCode:''}) fieldList.push({type:'int',value:'goodsQuantity',text:'商品条目数量',dictCode:''})
fieldList.push({type:'int',value:'paymentMethod',text:'支付方式',dictCode:'payment_method'}) fieldList.push({type:'int',value:'paymentMethod',text:'支付方式',dictCode:'payment_method'})
fieldList.push({type:'int',value:'paymentStatus',text:'支付状态',dictCode:'payment_status'}) fieldList.push({type:'int',value:'paymentStatus',text:'支付状态',dictCode:'payment_status'})
fieldList.push({type:'string',value:'accountNo',text:'账号/卡号',dictCode:''}) fieldList.push({type:'string',value:'accountNo',text:'账号/卡号',dictCode:''})
fieldList.push({type:'string',value:'bankDeposit',text:'开户银行',dictCode:''}) fieldList.push({type:'string',value:'bankDeposit',text:'开户银行',dictCode:''})
fieldList.push({type:'date',value:'paymentTime',text:'支付时间'}) fieldList.push({type:'date',value:'paymentTime',text:'支付时间'})
fieldList.push({type:'pca',value:'cityId',text:'城市'}) fieldList.push({type:'pca',value:'cityId',text:'城市'})
fieldList.push({type:'string',value:'address',text:'地址',dictCode:''}) fieldList.push({type:'string',value:'address',text:'地址',dictCode:''})
fieldList.push({type:'string',value:'zipCode',text:'邮编',dictCode:''}) fieldList.push({type:'string',value:'zipCode',text:'邮编',dictCode:''})
fieldList.push({type:'sel_user',value:'receiver',text:'收货人'}) fieldList.push({type:'sel_user',value:'receiver',text:'收货人'})
fieldList.push({type:'string',value:'mobile',text:'联系电话',dictCode:''}) fieldList.push({type:'string',value:'mobile',text:'联系电话',dictCode:''})
fieldList.push({type:'int',value:'invoiceCustomerType',text:'发票客户类型',dictCode:'invoice_customer_type'}) fieldList.push({type:'int',value:'invoiceCustomerType',text:'发票客户类型',dictCode:'invoice_customer_type'})
fieldList.push({type:'int',value:'invoiceType',text:'发票类型',dictCode:'invoice_type'}) fieldList.push({type:'int',value:'invoiceType',text:'发票类型',dictCode:'invoice_type'})
fieldList.push({type:'string',value:'taxIdentificationNumber',text:'纳税人识别号',dictCode:''}) fieldList.push({type:'string',value:'taxIdentificationNumber',text:'纳税人识别号',dictCode:''})
fieldList.push({type:'string',value:'addressBilling',text:'开票地址',dictCode:''}) fieldList.push({type:'string',value:'addressBilling',text:'开票地址',dictCode:''})
fieldList.push({type:'string',value:'telephone',text:'电话',dictCode:''}) fieldList.push({type:'string',value:'telephone',text:'电话',dictCode:''})
fieldList.push({type:'string',value:'bankPublic',text:'公户开户行',dictCode:''}) fieldList.push({type:'string',value:'bankPublic',text:'公户开户行',dictCode:''})
fieldList.push({type:'string',value:'accountNumber',text:'公户账号',dictCode:''}) fieldList.push({type:'string',value:'accountNumber',text:'公户账号',dictCode:''})
fieldList.push({type:'sel_depart',value:'salesEnterpriseId',text:'销售门店'}) fieldList.push({type:'sel_depart',value:'salesEnterpriseId',text:'销售门店'})
fieldList.push({type:'sel_user',value:'salespersonId',text:'销售员'}) fieldList.push({type:'sel_user',value:'salespersonId',text:'销售员'})
fieldList.push({type:'sel_depart',value:'logisticsEnterprisesId',text:'物流企业'}) fieldList.push({type:'sel_depart',value:'logisticsEnterprisesId',text:'物流企业'})
fieldList.push({type:'int',value:'deliveryStatus',text:'交付状态',dictCode:'delivery_status'}) fieldList.push({type:'int',value:'deliveryStatus',text:'交付状态',dictCode:'delivery_status'})
this.superFieldList = fieldList this.superFieldList = fieldList
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
@import '~@assets/less/common.less'; @import '~@assets/less/common.less';
</style> </style>

@ -238,7 +238,7 @@ public class ZyOrderController {
@ApiOperation(value = "获取完成订单的百分比", notes = "获取完成订单的百分比") @ApiOperation(value = "获取完成订单的百分比", notes = "获取完成订单的百分比")
@GetMapping("/percentageProduction") @GetMapping("/percentageProduction")
public Result<?> percentageProduction() { public Result<?> percentageProduction() {
Double percent = orderService.percentageProduction(); Double percent = orderService.percentageProduction();
return Result.OK(percent); return Result.OK(percent);
} }

@ -66,11 +66,8 @@ public class ZyOrderServiceImpl implements ZyOrderService {
String endTime; String endTime;
Date date = new Date(); Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String todayStr = formatter.format(date);//今天 String todayStr = formatter.format(date);//今天
System.out.println(todayStr); //System.out.println(todayStr);
Calendar calendar = Calendar.getInstance(); Calendar calendar = Calendar.getInstance();
calendar.setTime(date); calendar.setTime(date);
//把日期往后增加一天.整数往后推,负数往前移动(1:表示明天、-1:表示昨天,0:表示今天) //把日期往后增加一天.整数往后推,负数往前移动(1:表示明天、-1:表示昨天,0:表示今天)
@ -78,16 +75,11 @@ public class ZyOrderServiceImpl implements ZyOrderService {
//这个时间就是日期往后推一天的结果,明天 //这个时间就是日期往后推一天的结果,明天
date = calendar.getTime(); date = calendar.getTime();
String tomorrowStr = formatter.format(date); String tomorrowStr = formatter.format(date);
//System.out.println(tomorrowStr);
System.out.println(tomorrowStr);
starTime = todayStr + " 00:00:00"; starTime = todayStr + " 00:00:00";
endTime = tomorrowStr + " 00:00:00"; endTime = tomorrowStr + " 00:00:00";
// System.out.println(starTime);
System.out.println(starTime); // System.out.println(endTime);
System.out.println(endTime);
QueryWrapper<ZyOrder> wrapper = new QueryWrapper<>(); QueryWrapper<ZyOrder> wrapper = new QueryWrapper<>();
wrapper.ge("create_time", starTime).le("create_time", endTime).eq("pay_status", 1); wrapper.ge("create_time", starTime).le("create_time", endTime).eq("pay_status", 1);

@ -91,7 +91,7 @@ public class ZyShopServiceImpl implements ZyShopService {
@Override @Override
public String selectOrderBetweenThisW() { public String selectOrderBetweenThisW() {
String start_time = GetTime.getLastSevenDay(7); String start_time = GetTime.getLastSevenDay(7);
String end_time = String.format("%tF", date); String end_time = String.format("%tF", date)+" 23:59:59";
return zyShopMapper.selectOrderBetweenThisW(start_time, end_time); return zyShopMapper.selectOrderBetweenThisW(start_time, end_time);
} }
@ -103,7 +103,7 @@ public class ZyShopServiceImpl implements ZyShopService {
@Override @Override
public Double selectSalesVolumeBetweenThisW() { public Double selectSalesVolumeBetweenThisW() {
String start_time = GetTime.getLastSevenDay(7); String start_time = GetTime.getLastSevenDay(7);
String end_time = String.format("%tF", date); String end_time = String.format("%tF", date)+" 23:59:59";;
return zyShopMapper.selectSalesVolumeBetweenThisW(start_time, end_time); return zyShopMapper.selectSalesVolumeBetweenThisW(start_time, end_time);
} }

@ -15,7 +15,7 @@
</select> </select>
<!-- 查询该店铺当天所有销售额 --> <!-- 查询该店铺当天所有销售额 -->
<select id="selectSalesVolumeByThisD" resultType="Integer"> <select id="selectSalesVolumeByThisD" resultType="Double">
SELECT total_money SELECT total_money
FROM zy_order FROM zy_order
WHERE shop_id = #{id} WHERE shop_id = #{id}
@ -23,14 +23,14 @@
</select> </select>
<!-- 查询近七日订单数 --> <!-- 查询近七日订单数 -->
<select id="selectOrderBetweenThisW" resultType="String"> <select id="selectOrderBetweenThisW" resultType="Integer">
select count(*) select count(*)
from zy_orders from zy_orders
where payment_time BETWEEN #{start_time} AND #{end_time} AND ischild=0 where payment_time BETWEEN #{start_time} AND #{end_time} AND ischild=0
</select> </select>
<!-- 查询近七日销售额 --> <!-- 查询近七日销售额 -->
<select id="selectSalesVolumeBetweenThisW" resultType="Integer"> <select id="selectSalesVolumeBetweenThisW" resultType="Double">
SELECT sum(money) as total_money SELECT sum(money) as total_money
FROM zy_orders FROM zy_orders
WHERE payment_time between #{start_time} and #{end_time} AND ischild=0 WHERE payment_time between #{start_time} and #{end_time} AND ischild=0

@ -1,206 +1,206 @@
package org.jeecg.modules.demo.zyorders.entity; package org.jeecg.modules.demo.zyorders.entity;
import java.io.Serializable; import java.io.Serializable;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.util.Date; import java.util.Date;
import java.math.BigDecimal; import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data; import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel; import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict; import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
/** /**
* @Description: 订单基本信息管理 * @Description: 订单基本信息管理
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2022-12-26 * @Date: 2022-12-26
* @Version: V1.0 * @Version: V1.0
*/ */
@Data @Data
@TableName("zy_orders") @TableName("zy_orders")
@Accessors(chain = true) @Accessors(chain = true)
@EqualsAndHashCode(callSuper = false) @EqualsAndHashCode(callSuper = false)
@ApiModel(value="zy_orders对象", description="订单基本信息管理") @ApiModel(value="zy_orders对象", description="订单基本信息管理")
public class ZyOrders implements Serializable { public class ZyOrders implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/**主键*/ /**主键*/
@TableId(type = IdType.ASSIGN_ID) @TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键") @ApiModelProperty(value = "主键")
private java.lang.String id; private java.lang.String id;
/**创建人*/ /**创建人*/
@ApiModelProperty(value = "创建人") @ApiModelProperty(value = "创建人")
private java.lang.String createBy; private java.lang.String createBy;
/**创建日期*/ /**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期") @ApiModelProperty(value = "创建日期")
private java.util.Date createTime; private java.util.Date createTime;
/**更新人*/ /**更新人*/
@ApiModelProperty(value = "更新人") @ApiModelProperty(value = "更新人")
private java.lang.String updateBy; private java.lang.String updateBy;
/**更新日期*/ /**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@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;
/**所属部门*/ /**所属部门*/
@ApiModelProperty(value = "所属部门") @ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode; private java.lang.String sysOrgCode;
/**是否子单*/ /**是否子单*/
@Excel(name = "是否子单", width = 15, dicCode = "ischild") @Excel(name = "是否子单", width = 15, dicCode = "ischild")
@Dict(dicCode = "ischild") @Dict(dicCode = "ischild")
@ApiModelProperty(value = "是否子单") @ApiModelProperty(value = "是否子单")
private java.lang.Integer ischild; private java.lang.Integer ischild;
/**原订单id*/ /**原订单id*/
@Excel(name = "原订单id", width = 15) @Excel(name = "原订单id", width = 15)
@Dict(dictTable = "zy_orders", dicText = "orders_num", dicCode = "id") @Dict(dictTable = "zy_orders", dicText = "orders_num", dicCode = "id")
@ApiModelProperty(value = "原订单id") @ApiModelProperty(value = "原订单id")
private java.lang.String orderId; private java.lang.String orderId;
/**下单时间*/ /**下单时间*/
@Excel(name = "下单时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "下单时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "下单时间") @ApiModelProperty(value = "下单时间")
private java.util.Date orderTime; private java.util.Date orderTime;
/**订单编号*/ /**订单编号*/
@Excel(name = "订单编号", width = 15) @Excel(name = "订单编号", width = 15)
@ApiModelProperty(value = "订单编号") @ApiModelProperty(value = "订单编号")
private java.lang.String ordersNum; private java.lang.String ordersNum;
/**总金额*/ /**总金额*/
@Excel(name = "总金额", width = 15) @Excel(name = "总金额", width = 15)
@ApiModelProperty(value = "总金额") @ApiModelProperty(value = "总金额")
private java.lang.Double money; private java.lang.Double money;
/**运费*/ /**运费*/
@Excel(name = "运费", width = 15) @Excel(name = "运费", width = 15)
@ApiModelProperty(value = "运费") @ApiModelProperty(value = "运费")
private java.lang.Double freight; private java.lang.Double freight;
/**促销*/ /**促销*/
@Excel(name = "促销", width = 15) @Excel(name = "促销", width = 15)
@ApiModelProperty(value = "促销") @ApiModelProperty(value = "促销")
private java.lang.Double promotionPrice; private java.lang.Double promotionPrice;
/**实付款*/ /**实付款*/
@Excel(name = "实付款", width = 15) @Excel(name = "实付款", width = 15)
@ApiModelProperty(value = "实付款") @ApiModelProperty(value = "实付款")
private java.lang.Double actualPayment; private java.lang.Double actualPayment;
/**交货期*/ /**交货期*/
@Excel(name = "交货期", width = 15) @Excel(name = "交货期", width = 15)
@ApiModelProperty(value = "交货期") @ApiModelProperty(value = "交货期")
private java.lang.Integer deliveryTime; private java.lang.Integer deliveryTime;
/**订单类型*/ /**订单类型*/
@Excel(name = "订单类型", width = 15, dicCode = "orders_type") @Excel(name = "订单类型", width = 15, dicCode = "orders_type")
@Dict(dicCode = "orders_type") @Dict(dicCode = "orders_type")
@ApiModelProperty(value = "订单类型") @ApiModelProperty(value = "订单类型")
private java.lang.Integer ordersType; private java.lang.Integer ordersType;
/**顾客id*/ /**顾客id*/
@Excel(name = "顾客id", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") @Excel(name = "顾客id", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "id")
@ApiModelProperty(value = "顾客id") @ApiModelProperty(value = "顾客id")
private java.lang.String userId; private java.lang.String userId;
/**商品条目数量*/ /**商品条目数量*/
@Excel(name = "商品条目数量", width = 15) @Excel(name = "商品条目数量", width = 15)
@ApiModelProperty(value = "商品条目数量") @ApiModelProperty(value = "商品条目数量")
private java.lang.Integer goodsQuantity; private java.lang.Integer goodsQuantity;
/**支付方式*/ /**支付方式*/
@Excel(name = "支付方式", width = 15, dicCode = "payment_method") @Excel(name = "支付方式", width = 15, dicCode = "payment_method")
@Dict(dicCode = "payment_method") @Dict(dicCode = "payment_method")
@ApiModelProperty(value = "支付方式") @ApiModelProperty(value = "支付方式")
private java.lang.Integer paymentMethod; private java.lang.Integer paymentMethod;
/**支付状态*/ /**支付状态*/
@Excel(name = "支付状态", width = 15, dicCode = "payment_status") @Excel(name = "支付状态", width = 15, dicCode = "payment_status")
@Dict(dicCode = "payment_status") @Dict(dicCode = "payment_status")
@ApiModelProperty(value = "支付状态") @ApiModelProperty(value = "支付状态")
private java.lang.Integer paymentStatus; private java.lang.Integer paymentStatus;
/**账号/卡号*/ /**账号/卡号*/
@Excel(name = "账号/卡号", width = 15) @Excel(name = "账号/卡号", width = 15)
@ApiModelProperty(value = "账号/卡号") @ApiModelProperty(value = "账号/卡号")
private java.lang.String accountNo; private java.lang.String accountNo;
/**开户银行*/ /**开户银行*/
@Excel(name = "开户银行", width = 15) @Excel(name = "开户银行", width = 15)
@ApiModelProperty(value = "开户银行") @ApiModelProperty(value = "开户银行")
private java.lang.String bankDeposit; private java.lang.String bankDeposit;
/**支付时间*/ /**支付时间*/
@Excel(name = "支付时间", width = 15, format = "yyyy-MM-dd") @Excel(name = "支付时间", width = 15, format = "yyyy-MM-dd hh:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "支付时间") @ApiModelProperty(value = "支付时间")
private java.util.Date paymentTime; private java.util.Date paymentTime;
/**城市*/ /**城市*/
@Excel(name = "城市", width = 15) @Excel(name = "城市", width = 15)
@ApiModelProperty(value = "城市") @ApiModelProperty(value = "城市")
private java.lang.String cityId; private java.lang.String cityId;
/**地址*/ /**地址*/
@Excel(name = "地址", width = 15) @Excel(name = "地址", width = 15)
@ApiModelProperty(value = "地址") @ApiModelProperty(value = "地址")
private java.lang.String address; private java.lang.String address;
/**邮编*/ /**邮编*/
@Excel(name = "邮编", width = 15) @Excel(name = "邮编", width = 15)
@ApiModelProperty(value = "邮编") @ApiModelProperty(value = "邮编")
private java.lang.String zipCode; private java.lang.String zipCode;
/**收货人*/ /**收货人*/
@Excel(name = "收货人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") @Excel(name = "收货人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "收货人") @ApiModelProperty(value = "收货人")
private java.lang.String receiver; private java.lang.String receiver;
/**联系电话*/ /**联系电话*/
@Excel(name = "联系电话", width = 15) @Excel(name = "联系电话", width = 15)
@ApiModelProperty(value = "联系电话") @ApiModelProperty(value = "联系电话")
private java.lang.String mobile; private java.lang.String mobile;
/**发票客户类型*/ /**发票客户类型*/
@Excel(name = "发票客户类型", width = 15, dicCode = "invoice_customer_type") @Excel(name = "发票客户类型", width = 15, dicCode = "invoice_customer_type")
@Dict(dicCode = "invoice_customer_type") @Dict(dicCode = "invoice_customer_type")
@ApiModelProperty(value = "发票客户类型") @ApiModelProperty(value = "发票客户类型")
private java.lang.Integer invoiceCustomerType; private java.lang.Integer invoiceCustomerType;
/**发票类型*/ /**发票类型*/
@Excel(name = "发票类型", width = 15, dicCode = "invoice_type") @Excel(name = "发票类型", width = 15, dicCode = "invoice_type")
@Dict(dicCode = "invoice_type") @Dict(dicCode = "invoice_type")
@ApiModelProperty(value = "发票类型") @ApiModelProperty(value = "发票类型")
private java.lang.Integer invoiceType; private java.lang.Integer invoiceType;
/**纳税人识别号*/ /**纳税人识别号*/
@Excel(name = "纳税人识别号", width = 15) @Excel(name = "纳税人识别号", width = 15)
@ApiModelProperty(value = "纳税人识别号") @ApiModelProperty(value = "纳税人识别号")
private java.lang.String taxIdentificationNumber; private java.lang.String taxIdentificationNumber;
/**开票地址*/ /**开票地址*/
@Excel(name = "开票地址", width = 15) @Excel(name = "开票地址", width = 15)
@ApiModelProperty(value = "开票地址") @ApiModelProperty(value = "开票地址")
private java.lang.String addressBilling; private java.lang.String addressBilling;
/**电话*/ /**电话*/
@Excel(name = "电话", width = 15) @Excel(name = "电话", width = 15)
@ApiModelProperty(value = "电话") @ApiModelProperty(value = "电话")
private java.lang.String telephone; private java.lang.String telephone;
/**公户开户行*/ /**公户开户行*/
@Excel(name = "公户开户行", width = 15) @Excel(name = "公户开户行", width = 15)
@ApiModelProperty(value = "公户开户行") @ApiModelProperty(value = "公户开户行")
private java.lang.String bankPublic; private java.lang.String bankPublic;
/**公户账号*/ /**公户账号*/
@Excel(name = "公户账号", width = 15) @Excel(name = "公户账号", width = 15)
@ApiModelProperty(value = "公户账号") @ApiModelProperty(value = "公户账号")
private java.lang.String accountNumber; private java.lang.String accountNumber;
/**销售门店*/ /**销售门店*/
@Excel(name = "销售门店", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") @Excel(name = "销售门店", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "销售门店") @ApiModelProperty(value = "销售门店")
private java.lang.String salesEnterpriseId; private java.lang.String salesEnterpriseId;
/**销售员*/ /**销售员*/
@Excel(name = "销售员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username") @Excel(name = "销售员", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username") @Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
@ApiModelProperty(value = "销售员") @ApiModelProperty(value = "销售员")
private java.lang.String salespersonId; private java.lang.String salespersonId;
/**物流企业*/ /**物流企业*/
@Excel(name = "物流企业", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") @Excel(name = "物流企业", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id") @Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
@ApiModelProperty(value = "物流企业") @ApiModelProperty(value = "物流企业")
private java.lang.String logisticsEnterprisesId; private java.lang.String logisticsEnterprisesId;
/**交付状态*/ /**交付状态*/
@Excel(name = "交付状态", width = 15, dicCode = "delivery_status") @Excel(name = "交付状态", width = 15, dicCode = "delivery_status")
@Dict(dicCode = "delivery_status") @Dict(dicCode = "delivery_status")
@ApiModelProperty(value = "交付状态") @ApiModelProperty(value = "交付状态")
private java.lang.Integer deliveryStatus; private java.lang.Integer deliveryStatus;
} }

@ -1,21 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.demo.zyorders.mapper.ZyOrdersMapper"> <mapper namespace="org.jeecg.modules.demo.zyorders.mapper.ZyOrdersMapper">
<select id="getTotalOrderAndWeek" resultType="org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo"> <select id="getTotalOrderAndWeek" resultType="org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo">
SELECT SELECT
a.todayNum, a.todayNum,
b.weekTotal b.weekTotal
FROM FROM
( (
( SELECT COUNT( 1 ) todayNum FROM zy_orders WHERE to_days( create_time ) = to_days( now()) and payment_status=1 and ischild=0 ) a, ( SELECT COUNT( 1 ) todayNum FROM zy_orders WHERE to_days( create_time ) = to_days( now()) and payment_status=1 and ischild=0 ) a,
( (
SELECT SELECT
COUNT( 1 ) weekTotal COUNT( 1 ) weekTotal
FROM FROM
zy_orders zy_orders
WHERE WHERE
DATE_SUB( CURDATE(), INTERVAL 7 DAY ) &lt;= DATE( create_time ) and payment_status=1 and ischild=0 ) b) DATE_SUB( CURDATE(), INTERVAL 7 DAY ) &lt;= DATE( payment_time ) and payment_status=1 and ischild=0 ) b)
</select> </select>
</mapper> </mapper>

@ -1,345 +1,337 @@
package org.jeecg.modules.demo.zyorders.service.impl; package org.jeecg.modules.demo.zyorders.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice; import org.jeecg.modules.demo.customerinvoice.entity.CustomerInvoice;
import org.jeecg.modules.demo.customerinvoice.mapper.CustomerInvoiceMapper; import org.jeecg.modules.demo.customerinvoice.mapper.CustomerInvoiceMapper;
import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress; import org.jeecg.modules.demo.customerreceivingaddress.entity.CustomerReceivingAddress;
import org.jeecg.modules.demo.customerreceivingaddress.mapper.CustomerReceivingAddressMapper; import org.jeecg.modules.demo.customerreceivingaddress.mapper.CustomerReceivingAddressMapper;
import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories; import org.jeecg.modules.demo.goodsaccessories.entity.GoodsAccessories;
import org.jeecg.modules.demo.goodsaccessories.mapper.GoodsAccessoriesMapper; import org.jeecg.modules.demo.goodsaccessories.mapper.GoodsAccessoriesMapper;
import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric; import org.jeecg.modules.demo.goodsfabric.entity.GoodsFabric;
import org.jeecg.modules.demo.goodsfabric.mapper.GoodsFabricMapper; import org.jeecg.modules.demo.goodsfabric.mapper.GoodsFabricMapper;
import org.jeecg.modules.demo.goodsmodule.entity.GoodsModule; import org.jeecg.modules.demo.goodsmodule.entity.GoodsModule;
import org.jeecg.modules.demo.goodsmodule.mapper.GoodsModuleMapper; import org.jeecg.modules.demo.goodsmodule.mapper.GoodsModuleMapper;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoods; import org.jeecg.modules.demo.ordergoods.entity.OrderGoods;
import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk; import org.jeecg.modules.demo.ordergoods.entity.OrderGoodsJk;
import org.jeecg.modules.demo.ordergoods.mapper.OrderGoodsMapper; import org.jeecg.modules.demo.ordergoods.mapper.OrderGoodsMapper;
import org.jeecg.modules.demo.ordergoodsaccessories.entity.OrderGoodsAccessories; import org.jeecg.modules.demo.ordergoodsaccessories.entity.OrderGoodsAccessories;
import org.jeecg.modules.demo.ordergoodsaccessories.mapper.OrderGoodsAccessoriesMapper; import org.jeecg.modules.demo.ordergoodsaccessories.mapper.OrderGoodsAccessoriesMapper;
import org.jeecg.modules.demo.ordergoodsfabric.entity.OrderGoodsFabric; import org.jeecg.modules.demo.ordergoodsfabric.entity.OrderGoodsFabric;
import org.jeecg.modules.demo.ordergoodsfabric.mapper.OrderGoodsFabricMapper; import org.jeecg.modules.demo.ordergoodsfabric.mapper.OrderGoodsFabricMapper;
import org.jeecg.modules.demo.ordergoodsmodule.entity.OrderGoodsModule; import org.jeecg.modules.demo.ordergoodsmodule.entity.OrderGoodsModule;
import org.jeecg.modules.demo.ordergoodsmodule.mapper.OrderGoodsModuleMapper; import org.jeecg.modules.demo.ordergoodsmodule.mapper.OrderGoodsModuleMapper;
import org.jeecg.modules.demo.zygoods.entity.ZyGoods; import org.jeecg.modules.demo.zygoods.entity.ZyGoods;
import org.jeecg.modules.demo.zygoods.mapper.ZyGoodsMapper; import org.jeecg.modules.demo.zygoods.mapper.ZyGoodsMapper;
import org.jeecg.modules.demo.zyorders.entity.ZyOrders; import org.jeecg.modules.demo.zyorders.entity.ZyOrders;
import org.jeecg.modules.demo.zyorders.entity.ZyOrdersJk; import org.jeecg.modules.demo.zyorders.entity.ZyOrdersJk;
import org.jeecg.modules.demo.zyorders.mapper.ZyOrdersMapper; import org.jeecg.modules.demo.zyorders.mapper.ZyOrdersMapper;
import org.jeecg.modules.demo.zyorders.service.IZyOrdersService; import org.jeecg.modules.demo.zyorders.service.IZyOrdersService;
import org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo; import org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
/** /**
* @Description: 订单基本信息管理 * @Description: 订单基本信息管理
* @Author: jeecg-boot * @Author: jeecg-boot
* @Date: 2022-12-26 * @Date: 2022-12-26
* @Version: V1.0 * @Version: V1.0
*/ */
@Service @Service
public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> implements IZyOrdersService { public class ZyOrdersServiceImpl extends ServiceImpl<ZyOrdersMapper, ZyOrders> implements IZyOrdersService {
//商品 //商品
@Autowired @Autowired
private ZyGoodsMapper zyGoodsMapper; private ZyGoodsMapper zyGoodsMapper;
//订单商品表 //订单商品表
@Autowired @Autowired
private OrderGoodsMapper zyOrderGoodsMapper; private OrderGoodsMapper zyOrderGoodsMapper;
//商品模块表 //商品模块表
@Autowired @Autowired
private GoodsModuleMapper zyGoodsModuleMapper; private GoodsModuleMapper zyGoodsModuleMapper;
//订单商品模块表 //订单商品模块表
@Autowired @Autowired
private OrderGoodsModuleMapper zyOrderGoodsModuleMapper; private OrderGoodsModuleMapper zyOrderGoodsModuleMapper;
//商品面料表 //商品面料表
@Autowired @Autowired
private GoodsFabricMapper zyGoodsFabricMapper; private GoodsFabricMapper zyGoodsFabricMapper;
//订单商品面料表 //订单商品面料表
@Autowired @Autowired
private OrderGoodsFabricMapper zyOrderGoodsFabricMapper; private OrderGoodsFabricMapper zyOrderGoodsFabricMapper;
//商品辅料表 //商品辅料表
@Autowired @Autowired
private GoodsAccessoriesMapper zyGoodsAccessoriesMapper; private GoodsAccessoriesMapper zyGoodsAccessoriesMapper;
//订单商品辅料表 //订单商品辅料表
@Autowired @Autowired
private OrderGoodsAccessoriesMapper zyOrderGoodsAccessoriesMapper; private OrderGoodsAccessoriesMapper zyOrderGoodsAccessoriesMapper;
//顾客地址表 //顾客地址表
@Autowired @Autowired
CustomerReceivingAddressMapper customerReceivingAddressMapper; CustomerReceivingAddressMapper customerReceivingAddressMapper;
//客户发票信息 //客户发票信息
@Autowired @Autowired
CustomerInvoiceMapper customerInvoiceMapper; CustomerInvoiceMapper customerInvoiceMapper;
/** /**
* 大屏数据-获取订单的状态 * 大屏数据-获取订单的状态
* @return * @return
*/ */
@Override @Override
public List<ZyOrders> getOrderStatus() { public List<ZyOrders> getOrderStatus() {
String starTime; String starTime;
String endTime; String endTime;
Date date = new Date(); Date date = new Date();
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd");
String todayStr = formatter.format(date);//今天
String todayStr = formatter.format(date);//今天 Calendar calendar = Calendar.getInstance();
//System.out.println(todayStr); calendar.setTime(date);
//把日期往后增加一天.整数往后推,负数往前移动(1:表示明天、-1:表示昨天,0:表示今天)
calendar.add(Calendar.DATE, 1);
Calendar calendar = Calendar.getInstance(); //这个时间就是日期往后推一天的结果,明天
calendar.setTime(date); date = calendar.getTime();
//把日期往后增加一天.整数往后推,负数往前移动(1:表示明天、-1:表示昨天,0:表示今天) String tomorrowStr = formatter.format(date);
calendar.add(Calendar.DATE, 1);
//这个时间就是日期往后推一天的结果,明天 starTime = todayStr + " 00:00:00";
date = calendar.getTime(); endTime = tomorrowStr + " 00:00:00";
String tomorrowStr = formatter.format(date);
QueryWrapper<ZyOrders> wrapper = new QueryWrapper<>();
//System.out.println(tomorrowStr); wrapper.ge("create_time", starTime).le("create_time", endTime).eq("payment_status", 1);
List<ZyOrders> zyOrderList = baseMapper.selectList(wrapper);
starTime = todayStr + " 00:00:00"; return zyOrderList;
endTime = tomorrowStr + " 00:00:00"; }
// System.out.println(starTime); /**
// System.out.println(endTime); * 大屏数据-获取历史订单
* @return
QueryWrapper<ZyOrders> wrapper = new QueryWrapper<>(); */
wrapper.ge("create_time", starTime).le("create_time", endTime).eq("payment_status", 1); @Override
public List<ZyOrders> getOldOrder() {
List<ZyOrders> zyOrderList = baseMapper.selectList(wrapper); QueryWrapper<ZyOrders> wrapper = new QueryWrapper<>();
return zyOrderList; wrapper
} // .eq("is_delete", 0)
.orderByDesc("create_time");
/** List<ZyOrders> orderList = baseMapper.selectList(wrapper);
* 大屏数据-获取历史订单 return orderList;
* @return }
*/
@Override /**
public List<ZyOrders> getOldOrder() { * 获取今日订单及七日订单
QueryWrapper<ZyOrders> wrapper = new QueryWrapper<>(); * @return
wrapper */
// .eq("is_delete", 0) @Override
.orderByDesc("create_time"); public TodayOrderAndQIriVo getOrder() {
List<ZyOrders> orderList = baseMapper.selectList(wrapper); TodayOrderAndQIriVo todayOrderAndQIriVo = baseMapper.getTotalOrderAndWeek();
return orderList; if (todayOrderAndQIriVo != null) {
} return todayOrderAndQIriVo;
} else {
/** return null;
* 获取今日订单及七日订单 }
* @return }
*/
@Override /**
public TodayOrderAndQIriVo getOrder() { *
TodayOrderAndQIriVo todayOrderAndQIriVo = baseMapper.getTotalOrderAndWeek(); * @param zyOrdersJk
if (todayOrderAndQIriVo != null) { * @param orderGoodsJkList
return todayOrderAndQIriVo; * @return
} else { */
return null; @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++){
* @param zyOrdersJk ZyGoods zyGoods = zyGoodsMapper.selectById(orderGoodsJkList.get(i).getGoodsId());
* @param orderGoodsJkList money = money + zyGoods.getUnitPrice()*orderGoodsJkList.get(i).getGoodsNum();
* @return actual_payment = actual_payment + zyGoods.getPromotionPrice()*orderGoodsJkList.get(i).getGoodsNum();
*/ }
@Override ZyOrders zyOrders = new ZyOrders();
public List<String> orderJk(ZyOrdersJk zyOrdersJk, List<OrderGoodsJk> orderGoodsJkList) { zyOrders.setIschild(0);
zyOrders.setOrderTime(new Date());
Double actual_payment = 0.00; zyOrders.setOrdersNum(getOrdersNum());
Double money = 0.00; zyOrders.setMoney(money);
for(int i = 0 ; i < orderGoodsJkList.size() ; i++){ zyOrders.setFreight(zyOrdersJk.getFreight());
ZyGoods zyGoods = zyGoodsMapper.selectById(orderGoodsJkList.get(i).getGoodsId()); zyOrders.setPromotionPrice(money-actual_payment);
money = money + zyGoods.getUnitPrice()*orderGoodsJkList.get(i).getGoodsNum(); zyOrders.setActualPayment(actual_payment);
actual_payment = actual_payment + zyGoods.getPromotionPrice()*orderGoodsJkList.get(i).getGoodsNum(); zyOrders.setDeliveryTime(zyOrdersJk.getDeliveryTime());
} zyOrders.setOrdersType(zyOrdersJk.getOrdersType());
ZyOrders zyOrders = new ZyOrders(); zyOrders.setUserId(zyOrdersJk.getUserId());
zyOrders.setIschild(0); zyOrders.setGoodsQuantity(zyOrdersJk.getGoodsQuantity());
zyOrders.setOrderTime(new Date()); //顾客地址
zyOrders.setOrdersNum(getOrdersNum()); if(zyOrdersJk.getAddressId()!=null&&zyOrdersJk.getAddressId()!="")
zyOrders.setMoney(money); {
zyOrders.setFreight(zyOrdersJk.getFreight()); CustomerReceivingAddress customerReceivingAddress = customerReceivingAddressMapper.selectById(zyOrdersJk.getAddressId());
zyOrders.setPromotionPrice(money-actual_payment); zyOrders.setCityId(customerReceivingAddress.getCityId());
zyOrders.setActualPayment(actual_payment); zyOrders.setAddress(customerReceivingAddress.getAddress());
zyOrders.setDeliveryTime(zyOrdersJk.getDeliveryTime()); zyOrders.setZipCode(customerReceivingAddress.getZipCode());
zyOrders.setOrdersType(zyOrdersJk.getOrdersType()); zyOrders.setReceiver(zyOrdersJk.getReceiver());
zyOrders.setUserId(zyOrdersJk.getUserId()); zyOrders.setMobile(customerReceivingAddress.getMobile());
zyOrders.setGoodsQuantity(zyOrdersJk.getGoodsQuantity()); }
//顾客地址
if(zyOrdersJk.getAddressId()!=null&&zyOrdersJk.getAddressId()!="") //顾客发票
{ if(zyOrdersJk.getInvoiceId()!=null&&zyOrdersJk.getInvoiceId()!="")
CustomerReceivingAddress customerReceivingAddress = customerReceivingAddressMapper.selectById(zyOrdersJk.getAddressId()); {
zyOrders.setCityId(customerReceivingAddress.getCityId()); CustomerInvoice customerInvoice = customerInvoiceMapper.selectById(zyOrdersJk.getInvoiceId());
zyOrders.setAddress(customerReceivingAddress.getAddress()); zyOrders.setInvoiceCustomerType(Integer.parseInt(customerInvoice.getCustomerType()));
zyOrders.setZipCode(customerReceivingAddress.getZipCode()); zyOrders.setInvoiceType(Integer.parseInt(customerInvoice.getInvoiceType()));
zyOrders.setReceiver(zyOrdersJk.getReceiver()); zyOrders.setTaxIdentificationNumber(customerInvoice.getTaxIdentificationNumber());
zyOrders.setMobile(customerReceivingAddress.getMobile()); zyOrders.setAddressBilling(customerInvoice.getAddress());
} zyOrders.setTelephone(customerInvoice.getTelephone());
zyOrders.setBankPublic(customerInvoice.getBankDeposit());
//顾客发票 zyOrders.setAccountNumber(customerInvoice.getAccountNumber());
if(zyOrdersJk.getInvoiceId()!=null&&zyOrdersJk.getInvoiceId()!="") }
{
CustomerInvoice customerInvoice = customerInvoiceMapper.selectById(zyOrdersJk.getInvoiceId()); zyOrders.setSalesEnterpriseId(zyOrdersJk.getSalesEnterpriseId());
zyOrders.setInvoiceCustomerType(Integer.parseInt(customerInvoice.getCustomerType())); zyOrders.setSalespersonId(zyOrdersJk.getSalespersonId());
zyOrders.setInvoiceType(Integer.parseInt(customerInvoice.getInvoiceType())); zyOrders.setLogisticsEnterprisesId(zyOrdersJk.getLogisticsEnterprisesId());
zyOrders.setTaxIdentificationNumber(customerInvoice.getTaxIdentificationNumber()); zyOrders.setDeliveryStatus(0);
zyOrders.setAddressBilling(customerInvoice.getAddress()); zyOrders.setPaymentStatus(1);
zyOrders.setTelephone(customerInvoice.getTelephone()); zyOrders.setPaymentTime(new Date());
zyOrders.setBankPublic(customerInvoice.getBankDeposit()); baseMapper.insert(zyOrders);
zyOrders.setAccountNumber(customerInvoice.getAccountNumber()); for(int j = 0 ; j < orderGoodsJkList.size() ; j++){
} ZyGoods zyGoods = zyGoodsMapper.selectById(orderGoodsJkList.get(j).getGoodsId());
OrderGoods orderGoods = new OrderGoods();
zyOrders.setSalesEnterpriseId(zyOrdersJk.getSalesEnterpriseId()); orderGoods.setOrdersId(zyOrders.getId());
zyOrders.setSalespersonId(zyOrdersJk.getSalespersonId()); orderGoods.setGoodsId(orderGoodsJkList.get(j).getGoodsId());
zyOrders.setLogisticsEnterprisesId(zyOrdersJk.getLogisticsEnterprisesId()); orderGoods.setGoodsNum(orderGoodsJkList.get(j).getGoodsNum());
zyOrders.setDeliveryStatus(0); orderGoods.setGoodsCode(zyGoods.getGoodsCode());
baseMapper.insert(zyOrders); orderGoods.setGoodsName(zyGoods.getGoodsName());
for(int j = 0 ; j < orderGoodsJkList.size() ; j++){ orderGoods.setGoodsIntr(zyGoods.getGoodsIntr());
ZyGoods zyGoods = zyGoodsMapper.selectById(orderGoodsJkList.get(j).getGoodsId()); orderGoods.setCustomized(zyGoods.getCustomized());
OrderGoods orderGoods = new OrderGoods(); orderGoods.setMeasureId(zyOrdersJk.getMeasureId());
orderGoods.setOrdersId(zyOrders.getId()); orderGoods.setGoodsPicture(zyGoods.getGoodsPicture());
orderGoods.setGoodsId(orderGoodsJkList.get(j).getGoodsId()); orderGoods.setDefaultPicture(zyGoods.getDefaultPicture());
orderGoods.setGoodsNum(orderGoodsJkList.get(j).getGoodsNum()); orderGoods.setGoodsVideo(zyGoods.getGoodsVideo());
orderGoods.setGoodsCode(zyGoods.getGoodsCode()); orderGoods.setClothsTypeId(zyGoods.getClothsTypeId());
orderGoods.setGoodsName(zyGoods.getGoodsName()); orderGoods.setStyleId(zyGoods.getStyleId());
orderGoods.setGoodsIntr(zyGoods.getGoodsIntr()); orderGoods.setModelId(zyGoods.getModelId());
orderGoods.setCustomized(zyGoods.getCustomized()); orderGoods.setUnit(zyGoods.getUnit());
orderGoods.setMeasureId(zyOrdersJk.getMeasureId()); orderGoods.setNumber(zyGoods.getNumber());
orderGoods.setGoodsPicture(zyGoods.getGoodsPicture()); orderGoods.setUnitPrice(zyGoods.getUnitPrice());
orderGoods.setDefaultPicture(zyGoods.getDefaultPicture()); orderGoods.setDiscount(zyGoods.getDiscount());
orderGoods.setGoodsVideo(zyGoods.getGoodsVideo()); orderGoods.setPromotionPrice(zyGoods.getPromotionPrice());
orderGoods.setClothsTypeId(zyGoods.getClothsTypeId()); orderGoods.setRecommend(zyGoods.getRecommend());
orderGoods.setStyleId(zyGoods.getStyleId()); orderGoods.setPlaceOrigin(zyGoods.getPlaceOrigin());
orderGoods.setModelId(zyGoods.getModelId()); orderGoods.setStatus(zyGoods.getStatus());
orderGoods.setUnit(zyGoods.getUnit()); orderGoods.setTotalPrice(zyGoods.getUnitPrice()*orderGoodsJkList.get(j).getGoodsNum());
orderGoods.setNumber(zyGoods.getNumber()); orderGoods.setPayTotalPrice(zyGoods.getPromotionPrice()*orderGoodsJkList.get(j).getGoodsNum());
orderGoods.setUnitPrice(zyGoods.getUnitPrice()); zyOrderGoodsMapper.insert(orderGoods);
orderGoods.setDiscount(zyGoods.getDiscount()); GoodsModule goodsModule = new GoodsModule();
orderGoods.setPromotionPrice(zyGoods.getPromotionPrice()); QueryWrapper<GoodsModule> queryWrapperzsm = new QueryWrapper();
orderGoods.setRecommend(zyGoods.getRecommend()); queryWrapperzsm.eq("goods_id",zyGoods.getId());
orderGoods.setPlaceOrigin(zyGoods.getPlaceOrigin()); queryWrapperzsm.eq("style_id",zyGoods.getStyleId());
orderGoods.setStatus(zyGoods.getStatus()); List<GoodsModule> listzsm = zyGoodsModuleMapper.selectList(queryWrapperzsm);
orderGoods.setTotalPrice(zyGoods.getUnitPrice()*orderGoodsJkList.get(j).getGoodsNum()); for (int k = 0 ; k < listzsm.size() ; k++){
orderGoods.setPayTotalPrice(zyGoods.getPromotionPrice()*orderGoodsJkList.get(j).getGoodsNum()); OrderGoodsModule orderGoodsModule = new OrderGoodsModule();
zyOrderGoodsMapper.insert(orderGoods); orderGoodsModule.setOrderGoodsId(orderGoods.getId());
GoodsModule goodsModule = new GoodsModule(); orderGoodsModule.setGoodsId(zyGoods.getId());
QueryWrapper<GoodsModule> queryWrapperzsm = new QueryWrapper(); orderGoodsModule.setStyleId(zyGoods.getStyleId());
queryWrapperzsm.eq("goods_id",zyGoods.getId()); orderGoodsModule.setStyleModuleId(listzsm.get(k).getStyleModuleId());
queryWrapperzsm.eq("style_id",zyGoods.getStyleId()); orderGoodsModule.setModuleId(listzsm.get(k).getModuleId());
List<GoodsModule> listzsm = zyGoodsModuleMapper.selectList(queryWrapperzsm); zyOrderGoodsModuleMapper.insert(orderGoodsModule);
for (int k = 0 ; k < listzsm.size() ; k++){ }
OrderGoodsModule orderGoodsModule = new OrderGoodsModule(); GoodsFabric goodsFabric = new GoodsFabric();
orderGoodsModule.setOrderGoodsId(orderGoods.getId()); QueryWrapper<GoodsFabric> queryWrapperzsf =new QueryWrapper();
orderGoodsModule.setGoodsId(zyGoods.getId()); queryWrapperzsf.eq("goods_id",zyGoods.getId());
orderGoodsModule.setStyleId(zyGoods.getStyleId()); List<GoodsFabric> listzsf = zyGoodsFabricMapper.selectList(queryWrapperzsf);
orderGoodsModule.setStyleModuleId(listzsm.get(k).getStyleModuleId()); for (int o = 0 ; o < listzsf.size() ; o++){
orderGoodsModule.setModuleId(listzsm.get(k).getModuleId()); OrderGoodsFabric orderGoodsFabric = new OrderGoodsFabric();
zyOrderGoodsModuleMapper.insert(orderGoodsModule); orderGoodsFabric.setOrderGoodsId(orderGoods.getId());
} orderGoodsFabric.setGoodsId(zyGoods.getId());
GoodsFabric goodsFabric = new GoodsFabric(); orderGoodsFabric.setFabricId(listzsf.get(o).getFabricId());
QueryWrapper<GoodsFabric> queryWrapperzsf =new QueryWrapper(); zyOrderGoodsFabricMapper.insert(orderGoodsFabric);
queryWrapperzsf.eq("goods_id",zyGoods.getId()); }
List<GoodsFabric> listzsf = zyGoodsFabricMapper.selectList(queryWrapperzsf); GoodsAccessories goodsAccessories = new GoodsAccessories();
for (int o = 0 ; o < listzsf.size() ; o++){ QueryWrapper<GoodsAccessories> queryWrapperzsa = new QueryWrapper();
OrderGoodsFabric orderGoodsFabric = new OrderGoodsFabric(); queryWrapperzsa.eq("goods_id",zyGoods.getId());
orderGoodsFabric.setOrderGoodsId(orderGoods.getId()); List<GoodsAccessories> listzsa = zyGoodsAccessoriesMapper.selectList(queryWrapperzsa);
orderGoodsFabric.setGoodsId(zyGoods.getId()); for (int p = 0 ; p < listzsa.size() ; p++){
orderGoodsFabric.setFabricId(listzsf.get(o).getFabricId()); OrderGoodsAccessories orderGoodsAccessories = new OrderGoodsAccessories();
zyOrderGoodsFabricMapper.insert(orderGoodsFabric); orderGoodsAccessories.setOrderGoodsId(orderGoods.getId());
} orderGoodsAccessories.setGoodsId(zyGoods.getId());
GoodsAccessories goodsAccessories = new GoodsAccessories(); orderGoodsAccessories.setAccessoriesId(listzsa.get(p).getAccessoriesId());
QueryWrapper<GoodsAccessories> queryWrapperzsa = new QueryWrapper(); zyOrderGoodsAccessoriesMapper.insert(orderGoodsAccessories);
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()); List<String> ids = new ArrayList<>();
orderGoodsAccessories.setGoodsId(zyGoods.getId()); ZyOrders zos = new ZyOrders();
orderGoodsAccessories.setAccessoriesId(listzsa.get(p).getAccessoriesId()); QueryWrapper<ZyOrders> queryWrapperzos = new QueryWrapper();
zyOrderGoodsAccessoriesMapper.insert(orderGoodsAccessories); queryWrapperzos.eq("order_id",zyOrders.getId());
} List<ZyOrders> listzos = baseMapper.selectList(queryWrapperzos);
if(listzos.size()>0){
//return Result.error("该订单已经拆分,不可以再次拆单!");
} return null;
List<String> ids = new ArrayList<>(); }else{
ZyOrders zos = new ZyOrders(); OrderGoods orderGoods = new OrderGoods();
QueryWrapper<ZyOrders> queryWrapperzos = new QueryWrapper(); QueryWrapper<OrderGoods> queryWrapperog = new QueryWrapper();
queryWrapperzos.eq("order_id",zyOrders.getId()); queryWrapperog.eq("orders_id",zyOrders.getId());
List<ZyOrders> listzos = baseMapper.selectList(queryWrapperzos); List<OrderGoods> listog = zyOrderGoodsMapper.selectList(queryWrapperog);
if(listzos.size()>0){ if(listog.size()>0){
//return Result.error("该订单已经拆分,不可以再次拆单!"); for (int i = 0 ; i < listog.size() ; i++){
return null; ZyOrders zo = new ZyOrders();
}else{ zo = zyOrders;
OrderGoods orderGoods = new OrderGoods(); zo.setId(null);
QueryWrapper<OrderGoods> queryWrapperog = new QueryWrapper(); zo.setOrdersNum(getOrdersNum());
queryWrapperog.eq("orders_id",zyOrders.getId()); zo.setOrderId(listog.get(i).getId());
List<OrderGoods> listog = zyOrderGoodsMapper.selectList(queryWrapperog); zo.setFreight(Double.parseDouble("0"));
if(listog.size()>0){ zo.setIschild(1);
for (int i = 0 ; i < listog.size() ; i++){ zo.setOrderId(zyOrders.getId());
ZyOrders zo = new ZyOrders(); zo.setMoney(listog.get(i).getTotalPrice());
zo = zyOrders; zo.setPromotionPrice(listog.get(i).getPromotionPrice());
zo.setId(null); zo.setActualPayment(listog.get(i).getPayTotalPrice());
zo.setOrdersNum(getOrdersNum()); zo.setGoodsQuantity(1);
zo.setOrderId(listog.get(i).getId()); baseMapper.insert(zo);
zo.setFreight(Double.parseDouble("0")); ids.add(zo.getId());
zo.setIschild(1); OrderGoods og = new OrderGoods();
zo.setOrderId(zyOrders.getId()); og = listog.get(i);
zo.setMoney(listog.get(i).getTotalPrice()); og.setOrdersId(zo.getId());
zo.setPromotionPrice(listog.get(i).getPromotionPrice()); zyOrderGoodsMapper.updateById(og);
zo.setActualPayment(listog.get(i).getPayTotalPrice()); }
zo.setGoodsQuantity(1); }
baseMapper.insert(zo); }
ids.add(zo.getId()); return ids;
OrderGoods og = new OrderGoods(); }
og = listog.get(i);
og.setOrdersId(zo.getId());
zyOrderGoodsMapper.updateById(og); /**
} * 生成订单编号
} *
} * @param
return ids; * @return
} */
public String getOrdersNum() {
String mrstr = "000000000000000000";
/** QueryWrapper<ZyOrders> qw=new QueryWrapper();
* 生成订单编号 int listsize = baseMapper.selectCount(qw);
* int strsize = listsize+1;
* @param String str = strsize+"";
* @return int strlength = str.length();
*/ String substr = mrstr.substring(0,mrstr.length()-strlength);
public String getOrdersNum() { String OrdersNum = substr+str;
String mrstr = "000000000000000000"; return OrdersNum;
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;
}
}

@ -1,5 +1,6 @@
package org.jeecg.modules.largeScreen; package org.jeecg.modules.largeScreen;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -9,9 +10,12 @@ 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.orderbymakeclothplan.vo.TodayOrderAndQIriVo; import org.jeecg.modules.orderbymakeclothplan.vo.TodayOrderAndQIriVo;
import org.jeecg.modules.shop.vo.OrderSales; import org.jeecg.modules.shop.vo.OrderSales;
import org.jeecg.modules.system.entity.SysDepart;
import org.jeecg.modules.system.service.ISysDepartService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -28,6 +32,9 @@ public class LargeScreenController {
@Autowired @Autowired
private IZyOrdersService zyOrdersService; private IZyOrdersService zyOrdersService;
@Autowired
private ISysDepartService sysDepartService;
/********************************************订单大数据监控系统********************************************/ /********************************************订单大数据监控系统********************************************/
@ -88,4 +95,24 @@ public class LargeScreenController {
} }
} }
//店铺list
@AutoLog(value = "获取今日订单及七日订单")
@ApiOperation(value = "获取今日订单及七日订单", notes = "获取今日订单及七日订单")
@GetMapping("/getShopList")
public Result<?> getShopList() {
QueryWrapper<SysDepart> qw=new QueryWrapper();
//查询店铺和网店
List<String> data=new ArrayList<>();
data.add("5");
data.add("4");
qw.in("org_category",data);
List<SysDepart> list = sysDepartService.list(qw);
if (list.isEmpty()){
return Result.OK("未查询到店铺信息");
}
return Result.OK(list);
}
} }

Loading…
Cancel
Save