Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
New file |
| | |
| | | export default function footSum(list, field) { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | |
| | | |
| | | |
| | | let arr = [ |
| | | {type:'expand',fixed:"left",width: '60'}, |
| | | |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {field: 'inventoryOrganization', width:'150', title: '库存组织', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged }, |
| | |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | |
| | | const xGrid = ref(); |
| | | const gridEvents = { |
| | |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | }) |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | |
| | |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | }) |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | |
| | |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | } |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | }) |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code }) { |
| | |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import OrderOtherMoney from "@/components/sd/order/OrderOtherMoney.vue"; |
| | | import footSum from "@/hook/footSum"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | // 定义表头上传数据 |
| | | let titleUploadData = ref({ |
| | | deliveryState:'', |
| | | stockState:'', |
| | | paymentTerms:'', |
| | | customerId:'', |
| | | customerName:'', |
| | |
| | | |
| | | if(res.code==200){ |
| | | pageTotal.value=res.data.total |
| | | console.log(res.data.delivery) |
| | | titleUploadData.value=deepClone(res.data.delivery) |
| | | |
| | | |
| | |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | } |
| | | if(titleUploadData.value.deliveryState===0){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } |
| | | if(titleUploadData.value.stockState!==0){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } |
| | | pageNum=1 |
| | |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | |
| | | import {ElMessage} from "element-plus"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import DeliveryPrinting from "@/views/sd/delivery/DeliveryPrinting.vue"; |
| | | import footSum from "@/hook/footSum" |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | }) |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <el-button @click="getTableRow(row,'printing')" :disabled="row.deliveryState!==2" link type="primary" size="small">打印</el-button> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" title="确定删除?"> |
| | | <template #reference> |
| | | <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> |
| | | <el-button :disabled="row.deliveryState===2" link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </template> |
| | |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove" |
| | | import downLoadFile from "@/hook/downLoadFile" |
| | | import footSum from "@/hook/footSum" |
| | | import {useI18n} from "vue-i18n" |
| | | const { t } = useI18n() |
| | | |
| | |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total')+':' |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | const List = ["quantity",'grossAmount','grossArea','computeGrossArea'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | |
| | | ElMessage.error(t('order.msg.tableLengthMax')) |
| | | return |
| | | } |
| | | $grid.insert({}) |
| | | $grid.insertAt({}, $grid.getTableData.length || -1).then(() => { |
| | | }) |
| | | break |
| | | } |
| | | case 'deleteRow':{ |
| | |
| | | }, |
| | | cellDblclick (params) {//表格内容双击打开产品界面 |
| | | const { row,column } = params |
| | | console.log(column) |
| | | if(column.field==='productName' || column.field==='productId'){ |
| | | productVisible.value = true |
| | | rowIndex=row |
| | |
| | | titleUploadData.value.icon = titleSelectJson.value.icon[0].basicName |
| | | titleUploadData.value.packType = titleSelectJson.value.packType[0].basicName |
| | | titleUploadData.value.alType = titleSelectJson.value.alType[0].basicName |
| | | titleUploadData.value.calculateType=1 |
| | | titleUploadData.value.calculateType = 2 |
| | | const today = new Date |
| | | today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000)) |
| | | titleUploadData.value.deliveryDate = today.getFullYear() + |
| | |
| | | } |
| | | |
| | | const area = (row) => { |
| | | |
| | | return parseFloat((row.width * row.height/1000000).toFixed(2)) |
| | | } |
| | | const countArea = (row) => { |
| | | const area = parseFloat((row.width * row.height/1000000).toFixed(2)) |
| | | return parseFloat((area * row.quantity).toFixed(2)) |
| | | let areaSum = 0 |
| | | switch (titleUploadData.value.calculateType){ |
| | | case 1:{ |
| | | areaSum = parseFloat((area * row.quantity).toFixed(2)) |
| | | break |
| | | } |
| | | case 2:{ |
| | | areaSum = parseFloat((row.width * row.height * row.quantity/1000000).toFixed(2)) |
| | | break |
| | | } |
| | | } |
| | | return areaSum |
| | | } |
| | | //计算金钱 |
| | | const countMoney = (list) => { |
| | |
| | | } |
| | | item.area = area(item) |
| | | item.grossArea = countArea(item) |
| | | if(titleUploadData.value.calculateType===1){ |
| | | item.computeGrossArea = parseFloat((item.computeArea*item.quantity).toFixed(2)) |
| | | }else if(titleUploadData.value.calculateType===2){ |
| | | item.computeGrossArea = item.grossArea |
| | | } |
| | | if(titleUploadData.value.calculateType===3){ |
| | | item.grossAmount=parseFloat((item.price * item.quantity).toFixed(2)) |
| | | }else{ |
| | | item.grossAmount=parseFloat((item.price * item.computeGrossArea).toFixed(2)) |
| | | } |
| | | |
| | | }) |
| | | //赋值表头数据 |
| | | titleUploadData.value.money=countMoney(jsonData).toString() |
| | |
| | | row.grossAmount=parseFloat((row.price * row.computeGrossArea).toFixed(2)) |
| | | }else if(column.property === 'computeArea'){ |
| | | row.computeGrossArea=parseFloat((row.computeArea*row.quantity).toFixed(2)) |
| | | if(titleUploadData.value.calculateType!==3){ |
| | | row.grossAmount=parseFloat((row.price * row.computeGrossArea).toFixed(2)) |
| | | } |
| | | |
| | | } |
| | | // else if(column.property.indexOf('otherColumns.M')>-1){ |
| | | // let quantity = 0 |
| | |
| | | done() |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | } |
| | | } |
| | | //改变计算方式 |
| | | const changeCalculateType = ()=>{ |
| | | const fullData = xGrid.value.getTableData().fullData |
| | | if(fullData.length===0){ |
| | | return |
| | | } |
| | | fullData.forEach((item) => { |
| | | |
| | | if( !isNaN(item.computeArea*1) && item.computeArea != null ){ |
| | | item.grossArea = countArea(item) |
| | | item.computeGrossArea = item.grossArea |
| | | if(titleUploadData.value.calculateType===3){ |
| | | item.grossAmount=parseFloat((item.price * item.quantity).toFixed(2)) |
| | | }else{ |
| | | item.grossAmount=parseFloat((item.price * item.computeGrossArea).toFixed(2)) |
| | | } |
| | | |
| | | } |
| | | }) |
| | | titleUploadData.value.money=countMoney(fullData).toString() |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | <el-col :span="2"><el-input v-model="titleUploadData.batch"/></el-col> |
| | | <el-col :span="2"><el-text>{{$t('order.calculateType')}}:</el-text></el-col> |
| | | <el-col :span="2"> |
| | | <el-select v-model="titleUploadData.calculateType" clearable placeholder=" " > |
| | | <el-select @change="changeCalculateType" v-model="titleUploadData.calculateType" clearable placeholder=" " > |
| | | <el-option :value="1" label="面积金额(单片)"/> |
| | | <el-option :value="2" label="面积金额(总面积)"/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>*{{$t('order.salesman')}}:</el-text></el-col> |
| | |
| | | footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount'] |
| | | }) |
| | | |
| | | request.post('/order/exportOrderReport',null,{responseType :'blob'}).then(res => { |
| | | const blob = new Blob([res]) |
| | | // console.log(blob) |
| | | // if ('download' in document.createElement('a')) { // 非IE下载 |
| | | // const elink = document.createElement('a') |
| | | // elink.download = 'a.xlsx' |
| | | // elink.style.display = 'none' |
| | | // elink.href = URL.createObjectURL(blob) |
| | | // document.body.appendChild(elink) |
| | | // elink.click() |
| | | // URL.revokeObjectURL(elink.href) // 释放URL 对象 |
| | | // document.body.removeChild(elink) |
| | | // } else { // IE10+下载 |
| | | // navigator.msSaveBlob(blob, fileName) |
| | | // } |
| | | |
| | | }) |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | import {ElMessage} from "element-plus" |
| | | import {VXETable} from "vxe-table" |
| | | import useUserInfoStore from '@/stores/userInfo' |
| | | import footSum from "@/hook/footSum" |
| | | import {useI18n} from "vue-i18n" |
| | | import {columnDrop2, sortable2} from "@/hook/columnMove"; |
| | | const { t } = useI18n() |
| | |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | const List = ["quantity",'goodsQuantity','area','perimeter'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | |
| | | stripe:true,//斑马纹楼号 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | |
| | | tag:null, |
| | | tag2:null , |
| | | tag3:null, |
| | | xMargin:null, |
| | | yMargin:null, |
| | | xMargin:30, |
| | | yMargin:30, |
| | | location:[] |
| | | |
| | | }) |
| | |
| | | let trademarkVisible = ref(false) |
| | | const updateTrademark = (row) => { |
| | | trademarkVisible.value= true |
| | | Object.keys(trademarkAttr.value).forEach((key) => { |
| | | /*Object.keys(trademarkAttr.value).forEach((key) => { |
| | | if(key==='location'){ |
| | | trademarkAttr.value[key] = [] |
| | | }else if(key==='xMargin' || key==='yMargin'){ |
| | | trademarkAttr.value[key] = 30 |
| | | }else{ |
| | | trademarkAttr.value[key] = '' |
| | | } |
| | | }) |
| | | })*/ |
| | | trademarkAttr.value = { |
| | | trademark:"3C", |
| | | xImage:false, |
| | | yImage:false, |
| | | tag:true, |
| | | tag2:true , |
| | | tag3:true, |
| | | xMargin:30, |
| | | yMargin:30, |
| | | location:'左下' |
| | | } |
| | | if(row.icon!=null){ |
| | | trademarkAttr.value = JSON.parse(row.icon) |
| | | } |
| | |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, OrderDTO.class, orderService.exportOrderReport(dates),"orderReport"); |
| | | } |
| | | |
| | | @ApiOperation("订单产品汇总报表导出") |
| | | @PostMapping("/exportOrderProductSummary") |
| | | public void exportOrderProductSummary(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, OrderDTO.class, orderService.exportOrderProductSummary(dates),"orderReport"); |
| | | } |
| | | |
| | | @ApiOperation("订单小片标签") |
| | | @PostMapping("/getOrderProductDetailTag/{orderId}") |
| | | public Result getOrderProductDetailTag(@PathVariable String orderId) { |
| | | return Result.seccess(orderService.getOrderProductDetailTag(orderId)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | |
| | | List<DeliveryDetail> getIsNotDeliveryDetail(@Param("deliveryDetailNumber") String deliveryDetailNumber,@Param("deliveryId") String deliveryId); |
| | | List<DeliveryDetail> getIsNotDeliveryDetail(@Param("deliveryId") String deliveryId); |
| | | |
| | | |
| | | |
| | |
| | | List<OrderDetail> getOrderProductSummary(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail); |
| | | |
| | | Map<String,Integer> getOrderProductSummaryTotal(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail, String product); |
| | | |
| | | List<OrderDTO> exportOrderProductSummary(List<LocalDate> dates); |
| | | |
| | | Map<String, String> getOrderProductDetailTag(String orderId); |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | List<DeliveryDetail> deliveryDetaillist = deliveryDetailMapper.getIsNotDeliveryDetail(deliveryDetailNumber, deliveryId); |
| | | List<DeliveryDetail> deliveryDetaillist = deliveryDetailMapper.getIsNotDeliveryDetail(deliveryId); |
| | | if (!deliveryDetaillist.isEmpty()) { |
| | | for (DeliveryDetail deliveryDetail : deliveryDetaillist) { |
| | | //还原库存数以及订单明细的发货数 |
| | |
| | | if (object.get("deliveryId") != null) { |
| | | deliveryId = object.get("deliveryId").toString(); |
| | | } |
| | | List<DeliveryDetail> deliveryDetaillist = deliveryDetailMapper.getIsNotDeliveryDetail(deliveryId); |
| | | if (!deliveryDetaillist.isEmpty()) { |
| | | for (DeliveryDetail deliveryDetail : deliveryDetaillist) { |
| | | //还原库存数以及订单明细的发货数 |
| | | finishedGoodsInventoryMapper.updateInventoryquantityInt(deliveryDetail.getOrderId(), deliveryDetail.getOrderNumber(), deliveryDetail.getQuantity()); |
| | | deliveryDetailMapper.updateIsNotOrderDetailDeliveryNum(deliveryDetail.getOrderId(), deliveryDetail.getOrderNumber(), deliveryDetail.getQuantity()); |
| | | } |
| | | } |
| | | //删除订单额外金额的数据 |
| | | deliveryOtherMoneyMapper.deleteDeliveryOtherMoney(deliveryId); |
| | | deliveryDetailMapper.deleteDeliveryDetail(deliveryId); |
| | | deliveryMapper.deleteDelivery(deliveryId); |
| | | |
| | |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import com.sun.org.apache.regexp.internal.RE; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | |
| | | // map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail)); |
| | | return map; |
| | | } |
| | | |
| | | public List<OrderDTO> exportOrderProductSummary(List<LocalDate> dates) { |
| | | return orderDetailMapper.exportOrderProductSummary(dates); |
| | | } |
| | | |
| | | public Map<String,String> getOrderProductDetailTag(String orderId) { |
| | | return orderDetailMapper.getOrderProductDetailTag(orderId); |
| | | } |
| | | } |
| | |
| | | response.setContentType("application/vnd.ms-excel");// 设置文本内省 |
| | | response.setCharacterEncoding("utf-8");// 设置字符编码 |
| | | response.setHeader("Content-disposition", "attachment;filename="+reportName+".xlsx"); // 设置响应头 |
| | | try { |
| | | EasyExcel.write(response.getOutputStream(), t).sheet("模板").doWrite(list); //用io流来写入数据 |
| | | }catch (Exception e){ |
| | | System.out.println("文件导出异常"+reportName+":"+e.getMessage()); |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | ) as ss |
| | | </select> |
| | | |
| | | <select id="exportOrderProductSummary" > |
| | | SELECT |
| | | *, |
| | | a.create_time as createTime, |
| | | d.type_name as level_one, |
| | | e.type_name as level_two |
| | | from order_detail as a |
| | | left join sd.`order` as b |
| | | on b.order_id = a.order_id |
| | | left join sd.product as c |
| | | on c.id = a.product_id |
| | | left join sd.basic_glass_type as d |
| | | on d.type_id = c.type_id |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | where date(a.create_time)>=#{dates[0]} and date(a.create_time) <= #{dates[1]} |
| | | group by b.order_id,a.product_id |
| | | order by b.order_id desc |
| | | </select> |
| | | |
| | | <select id="getOrderProductDetailTag"> |
| | | select c.customer_name,c.order_id,b.remarks,c.project, |
| | | if(a.child_width < a.child_height,a.child_width,a.child_height ), |
| | | if(a.child_width < a.child_height,a.child_height,a.child_width ), |
| | | sum(b.quantity), |
| | | a.glass_child, |
| | | b.processing_note |
| | | from order_glass_detail as a |
| | | left join order_detail as b |
| | | on a.order_id = b.order_id |
| | | and a.order_number = b.order_number |
| | | left join `order` as c |
| | | on c.order_id = a.order_id |
| | | where a.order_id = #{orderId} |
| | | group by a.glass_child,a.child_width,a.child_height |
| | | </select> |
| | | |
| | | |
| | | </mapper> |