| | |
| | | <script setup> |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {reactive, ref} from "vue" |
| | | import {defineEmits, onMounted, reactive, ref, watch} from "vue" |
| | | import {changeFilterEvent} from "@/hook" |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | const xGrid = ref() |
| | | let filterData = ref({}) |
| | | const gridOptions = reactive({ |
| | | loading:true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'OrderReport', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {field: '1',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '2',width:120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '3',width:120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '4',width:120, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '5',width:120, title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '6',width:120, title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '7',width:120, title: '产品编码',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '8',width:120, title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '9',width:120, title: '订单序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '半径',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '实际面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '结算总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '主加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '商标选项',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '包装方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '工艺流程',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '周长',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '单价',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '金额',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '铝条方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '业务员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '送货地址',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '制单员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '建立时间',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '总厚度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '产品大类',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '产品小类',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'prodID',width:120, title: '客户批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | |
| | | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | if (props.childrenData.footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | |
| | | }) |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | const props = defineProps({ |
| | | childrenData:{ |
| | | Object, |
| | | default: '' |
| | | } |
| | | }) |
| | | watch(props, (newVal) => { |
| | | gridOptions.loading = true |
| | | xGrid.value.loadData(props.childrenData.data) |
| | | gridOptions.loading = false |
| | | }) |
| | | onMounted(() => { |
| | | gridOptions.columns = props.childrenData.columns |
| | | |
| | | }) |
| | | const emit = defineEmits(['getData']) |
| | | function filterChanged(column){ |
| | | //gridOptions.loading=true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.')>-1){ |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]:value |
| | | } |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | const gaveParentData = { |
| | | selectDate:props.childrenData.selectDate, |
| | | filterData:filterData.value |
| | | } |
| | | emit('getData',filterData.value) |
| | | |
| | | } |
| | | |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | props.childrenData.pageNum = currentPage |
| | | props.childrenData.pageTotal = pageSize |
| | | emit('getData',filterData.value) |
| | | } |
| | | const dateChanged = () => { |
| | | emit('getData',filterData.value) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div"> |
| | | <el-date-picker |
| | | v-model="value1" |
| | | v-model="props.childrenData.selectDate" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | /> |
| | | <el-button style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">查询</el-button> |
| | | <el-button |
| | | @click="dateChanged" |
| | | id="searchButton" |
| | | type="primary" |
| | | style="margin-top: -5px" |
| | | :icon="Search">查询</el-button> |
| | | <div class="order-detail"> |
| | | <vxe-grid |
| | | max-height="97%" |
| | | @filter-change="filterChanged" |
| | | height="110%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | ></vxe-grid> |
| | | > |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <!-- 'PrevJump','NextJump', --> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | v-model:current-page="props.childrenData.pageNum" |
| | | v-model:page-size="props.childrenData.pageSize" |
| | | v-model:pager-count="props.childrenData.pageTotal" |
| | | :total="props.childrenData.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | </vxe-grid> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | <style scoped > |
| | | .main-div { |
| | | width: 100%; |
| | | height: 100%; |
| | |
| | | } |
| | | .order-detail{ |
| | | width: 100%; |
| | | height: 90%; |
| | | height: calc(100% - 30px); |
| | | |
| | | } |
| | | </style> |
| | |
| | | // 筛选函数 |
| | | const filterChanged = ({ option, row, column }) => { |
| | | if (option.data) { |
| | | return row[column.field].toString().toLowerCase().indexOf(option.data) > -1 |
| | | return row[column.field].toString().indexOf(option.data) > -1 |
| | | } |
| | | return true |
| | | } |
| | |
| | | <script setup> |
| | | import BasicTable from "@/components/BasicTable.vue" |
| | | import request from "@/utils/request" |
| | | import {ref} from "vue" |
| | | import {onMounted, reactive, ref} from "vue" |
| | | const selectData = ref(["",""]) |
| | | let data = ref({}) |
| | | request.post(`/order/getOrderReport/1/100/${selectData.value}`,data.value).then(res => { |
| | | if(res.code === '200'){ |
| | | console.log(res.data) |
| | | } |
| | | let filterData = ref({}) |
| | | |
| | | const childrenData = ref({ |
| | | columns:[ |
| | | {type:'expand',fixed:"left",width: 80}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {field: 'order.orderType',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.customerName',width:120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.project',width:120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.orderId',width:120, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.batch',width:120, title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'productId',width:120, title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'productName',width:120, title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderNumber',width:120, title: '订单序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | // {field: 'buildingNumber',width:120, title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'width',width:120, title: '宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'height',width:120, title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity',width:120, title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'bendRadius',width:120, title: '弯钢弧度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'grossArea',width:120, title: '实际面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'computeGrossArea',width:150, title: '结算总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'shape',width:120, title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'edgingType',width:120, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.processingNote',width:140, title: '主加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'processingNote',width:120, title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.remarks',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.icon',width:120, title: '商标选项',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.packType',width:120, title: '包装方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | // {field: 'prodID',width:120, title: '工艺流程',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'perimeter',width:120, title: '周长',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'price',width:120, title: '单价',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'grossAmount',width:120, title: '金额',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.alType',width:120, title: '铝条方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | // {field: 'prodID',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.salesman',width:120, title: '业务员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.deliveryAddress',width:120, title: '送货地址',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.creator',width:120, title: '制单员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'createTime',width:120, title: '建立时间',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'totalThickness',width:120, title: '总厚度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'levelOne',width:120, title: '产品大类',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'levelTwo',width:120, title: '产品小类',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.customerBatch',width:120, title: '客户批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | ],//表格表头字段 |
| | | data:[],//表格数据 |
| | | pageTotal : 0,//总页数 |
| | | dataTotal : 0,//数据总条数 |
| | | pageSize : 100,//页面显示数量 |
| | | pageNum:1,//当前页 |
| | | selectDate:['',''],//查询的日期 |
| | | footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount'] |
| | | }) |
| | | //页面第一次加载 |
| | | onMounted(() => { |
| | | getReportData() |
| | | }) |
| | | |
| | | //封装获取数据方法方法 |
| | | const getReportData = () => { |
| | | request.post(`/order/getOrderReport/${childrenData.value.pageNum}/${childrenData.value.pageSize}/${childrenData.value.selectDate}`,filterData.value).then(res => { |
| | | if(res.code === '200'){ |
| | | childrenData.value.data = res.data.data |
| | | childrenData.value.pageTotal = res.data.total.pageTotal |
| | | childrenData.value.dataTotal = res.data.total.total |
| | | childrenData.value.selectDate = res.data.selectDate |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const getData = (filter) => { |
| | | filterData.value = filter |
| | | getReportData() |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <basic-table/> |
| | | <basic-table |
| | | @getData="getData" |
| | | :childrenData="childrenData"/> |
| | | </template> |
| | | |
| | | <style scoped> |
| | |
| | | private Integer state; |
| | | private LocalDate createTime; |
| | | private LocalDate updateTime; |
| | | @TableField(select = false) |
| | | @TableField(select = false,exist= false) |
| | | private Order order; |
| | | @TableField(select = false) |
| | | @TableField(select = false,exist= false) |
| | | private Delivery delivery; |
| | | @TableField(select = false) |
| | | @TableField(select = false,exist= false) |
| | | private DeliveryDetail deliveryDetail; |
| | | @TableField(select = false) |
| | | @TableField(select = false,exist= false) |
| | | private FinishedGoodsInventory finishedGoodsInventory; |
| | | @TableField(exist= false) |
| | | private String levelOne; |
| | | @TableField(exist= false) |
| | | private String levelTwo; |
| | | @TableField(exist= false) |
| | | private String totalThickness; |
| | | //private Product product; |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface OrderDetailMapper extends BaseMapper<OrderDetail> { |
| | |
| | | boolean updateOrderMoney( List<OrderDetail> orderDetails); |
| | | |
| | | List<OrderDetail> getOrderReport(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail); |
| | | |
| | | Map<String,Integer> getOrderReportTotal(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail); |
| | | } |
| | |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",orderDetailMapper.getOrderReport(offset, pageSize, startDate, endDate, orderDetail)); |
| | | map.put("total",orderDetailMapper.getOrderReportTotal(offset, pageSize, startDate, endDate, orderDetail)); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | // map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail)); |
| | | return map; |
| | | } |
| | |
| | | <resultMap id="orderMap" type="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="order_number" property="orderNumber"/> |
| | | |
| | | <result column="order_number" property="productId"/> |
| | | <result column="order_number" property="productName"/> |
| | | <result column="order_number" property="width"/> |
| | | <result column="order_number" property="height"/> |
| | | <result column="order_number" property="quantity"/> |
| | | <result column="order_number" property="bendRadius"/> |
| | | <result column="order_number" property="grossArea"/> |
| | | <result column="order_number" property="computeGrossArea"/> |
| | | <result column="order_number" property="shape"/> |
| | | <result column="order_number" property="edgingType"/> |
| | | <result column="order_number" property="processingNote"/> |
| | | <result column="order_number" property="remarks"/> |
| | | <result column="order_number" property="perimeter"/> |
| | | <result column="order_number" property="grossAmount"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="price" property="price"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | <result column="gross_area" property="grossArea"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="edging_type" property="edgingType"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="remarks" property="remarks"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="gross_amount" property="grossAmount"/> |
| | | <result column="levelOne" property="levelOne"/> |
| | | <result column="levelTwo" property="levelTwo"/> |
| | | <result column="total_thickness" property="totalThickness"/> |
| | | <result column="createTime" property="createTime"/> |
| | | |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="order_type" property="orderType"/> |
| | | |
| | | <result column="customer_name" property="customerName"/> |
| | | <result column="project" property="project"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="b.processing_note" property="processingNote"/> |
| | | <result column="icon" property="icon"/> |
| | | <result column="packType" property="packType"/> |
| | | <result column="salesman" property="salesman"/> |
| | |
| | | <result column="creator" property="creator"/> |
| | | <result column="verifier" property="verifier"/> |
| | | <result column="customer_batch" property="customerBatch"/> |
| | | |
| | | |
| | | </association> |
| | | |
| | | </resultMap> |
| | |
| | | |
| | | <select id="getOrderReport" resultMap="orderMap"> |
| | | SELECT |
| | | * |
| | | *, |
| | | a.create_time as createTime, |
| | | d.type_name as levelOne, |
| | | e.type_name as levelTwo |
| | | 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(b.create_time)>=#{startDate} and date(b.create_time) <= #{endDate} |
| | | limit #{offset},#{pageSize} |
| | | |
| | | <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')"> |
| | | and b.order_type like concat('%',#{orderDetail.order.orderType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and b.customer_id like concat('%',#{orderDetail.order.customerId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and b.project like concat('%',#{orderDetail.order.project},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.orderId != null and orderDetail.order.orderId != ''"> |
| | | and b.order_id like concat('%',#{orderDetail.order.orderId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and b.batch like concat('%',#{orderDetail.order.batch},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and a.product_id like concat('%',#{orderDetail.productId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and a.product_name like concat('%',#{orderDetail.productName},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and a.quantity like concat('%',#{orderDetail.quantity},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''"> |
| | | and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and a.shape like concat('%',#{orderDetail.shape},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and a.edging_type like concat('%',#{orderDetail.edgingType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''"> |
| | | and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and a.processing_note like concat('%',#{orderDetail.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.icon != null and orderDetail.order.icon != ''"> |
| | | and b.icon like concat('%',#{orderDetail.order.icon},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.packType != null and orderDetail.order.packType != ''"> |
| | | and b.pack_type like concat('%',#{orderDetail.order.packType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and a.perimeter like concat('%',#{orderDetail.perimeter},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and a.price like concat('%',#{orderDetail.price},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | | and b.al_type like concat('%',#{orderDetail.order.alType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and b.salesman like concat('%',#{orderDetail.order.salesman},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''"> |
| | | and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.creator != null and orderDetail.order.creator != ''"> |
| | | and b.creator like concat('%',#{orderDetail.order.creator},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''"> |
| | | and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''"> |
| | | and d.type_name like concat('%',#{orderDetail.levelOne},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''"> |
| | | and e.type_name like concat('%',#{orderDetail.levelTwo},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''"> |
| | | and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%') |
| | | </if> |
| | | order by a.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | <select id="getOrderReportTotal" > |
| | | SELECT |
| | | CEILING(count(a.id)/#{pageSize}) as 'pageTotal', |
| | | count(a.id) as 'total' |
| | | 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(b.create_time)>=#{startDate} and date(b.create_time) <= #{endDate} |
| | | <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')"> |
| | | and b.order_type like concat('%',#{orderDetail.order.orderType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and b.customer_id like concat('%',#{orderDetail.order.customerId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and b.project like concat('%',#{orderDetail.order.project},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.orderId != null and orderDetail.order.orderId != ''"> |
| | | and b.order_id like concat('%',#{orderDetail.order.orderId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and b.batch like concat('%',#{orderDetail.order.batch},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and a.product_id like concat('%',#{orderDetail.productId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and a.product_name like concat('%',#{orderDetail.productName},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and a.quantity like concat('%',#{orderDetail.quantity},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''"> |
| | | and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and a.shape like concat('%',#{orderDetail.shape},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and a.edging_type like concat('%',#{orderDetail.edgingType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''"> |
| | | and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and a.processing_note like concat('%',#{orderDetail.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.icon != null and orderDetail.order.icon != ''"> |
| | | and b.icon like concat('%',#{orderDetail.order.icon},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.packType != null and orderDetail.order.packType != ''"> |
| | | and b.pack_type like concat('%',#{orderDetail.order.packType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and a.perimeter like concat('%',#{orderDetail.perimeter},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and a.price like concat('%',#{orderDetail.price},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | | and b.al_type like concat('%',#{orderDetail.order.alType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and b.salesman like concat('%',#{orderDetail.order.salesman},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''"> |
| | | and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.creator != null and orderDetail.order.creator != ''"> |
| | | and b.creator like concat('%',#{orderDetail.order.creator},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''"> |
| | | and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''"> |
| | | and d.type_name like concat('%',#{orderDetail.levelOne},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''"> |
| | | and e.type_name like concat('%',#{orderDetail.levelTwo},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''"> |
| | | and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%') |
| | | </if> |
| | | order by a.id desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | left join |
| | | (select sum(patch_num) as patchNumSum,order_sort,technology_number,process_id |
| | | from patch_log |
| | | group by reporting_work_id,order_sort,technology_number) as c |
| | | group by process_id,order_sort,technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | | and c.technology_number = fc.technology_number |
| | |
| | | left join |
| | | (select sum(patch_num) as patchNumSum,order_sort,technology_number,process_id |
| | | from patch_log |
| | | group by reporting_work_id,order_sort,technology_number) as c |
| | | group by process_id,order_sort,technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | | and c.technology_number = fc.technology_number |
| | |
| | | <resultMap id="orderMap" type="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="order_number" property="orderNumber"/> |
| | | |
| | | <result column="order_number" property="productId"/> |
| | | <result column="order_number" property="productName"/> |
| | | <result column="order_number" property="width"/> |
| | | <result column="order_number" property="height"/> |
| | | <result column="order_number" property="quantity"/> |
| | | <result column="order_number" property="bendRadius"/> |
| | | <result column="order_number" property="grossArea"/> |
| | | <result column="order_number" property="computeGrossArea"/> |
| | | <result column="order_number" property="shape"/> |
| | | <result column="order_number" property="edgingType"/> |
| | | <result column="order_number" property="processingNote"/> |
| | | <result column="order_number" property="remarks"/> |
| | | <result column="order_number" property="perimeter"/> |
| | | <result column="order_number" property="grossAmount"/> |
| | | <result column="product_id" property="productId"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="price" property="price"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | <result column="gross_area" property="grossArea"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="edging_type" property="edgingType"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="remarks" property="remarks"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="gross_amount" property="grossAmount"/> |
| | | <result column="levelOne" property="levelOne"/> |
| | | <result column="levelTwo" property="levelTwo"/> |
| | | <result column="total_thickness" property="totalThickness"/> |
| | | <result column="createTime" property="createTime"/> |
| | | |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="order_type" property="orderType"/> |
| | | |
| | | <result column="customer_name" property="customerName"/> |
| | | <result column="project" property="project"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="b.processing_note" property="processingNote"/> |
| | | <result column="icon" property="icon"/> |
| | | <result column="packType" property="packType"/> |
| | | <result column="salesman" property="salesman"/> |
| | |
| | | <result column="creator" property="creator"/> |
| | | <result column="verifier" property="verifier"/> |
| | | <result column="customer_batch" property="customerBatch"/> |
| | | |
| | | |
| | | </association> |
| | | |
| | | </resultMap> |
| | |
| | | |
| | | <select id="getOrderReport" resultMap="orderMap"> |
| | | SELECT |
| | | * |
| | | *, |
| | | a.create_time as createTime, |
| | | d.type_name as levelOne, |
| | | e.type_name as levelTwo |
| | | 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(b.create_time)>=#{startDate} and date(b.create_time) <= #{endDate} |
| | | limit #{offset},#{pageSize} |
| | | |
| | | <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')"> |
| | | and b.order_type like concat('%',#{orderDetail.order.orderType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and b.customer_id like concat('%',#{orderDetail.order.customerId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and b.project like concat('%',#{orderDetail.order.project},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.orderId != null and orderDetail.order.orderId != ''"> |
| | | and b.order_id like concat('%',#{orderDetail.order.orderId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and b.batch like concat('%',#{orderDetail.order.batch},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and a.product_id like concat('%',#{orderDetail.productId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and a.product_name like concat('%',#{orderDetail.productName},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and a.quantity like concat('%',#{orderDetail.quantity},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''"> |
| | | and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and a.shape like concat('%',#{orderDetail.shape},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and a.edging_type like concat('%',#{orderDetail.edgingType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''"> |
| | | and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and a.processing_note like concat('%',#{orderDetail.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.icon != null and orderDetail.order.icon != ''"> |
| | | and b.icon like concat('%',#{orderDetail.order.icon},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.packType != null and orderDetail.order.packType != ''"> |
| | | and b.pack_type like concat('%',#{orderDetail.order.packType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and a.perimeter like concat('%',#{orderDetail.perimeter},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and a.price like concat('%',#{orderDetail.price},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | | and b.al_type like concat('%',#{orderDetail.order.alType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and b.salesman like concat('%',#{orderDetail.order.salesman},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''"> |
| | | and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.creator != null and orderDetail.order.creator != ''"> |
| | | and b.creator like concat('%',#{orderDetail.order.creator},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''"> |
| | | and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''"> |
| | | and d.type_name like concat('%',#{orderDetail.levelOne},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''"> |
| | | and e.type_name like concat('%',#{orderDetail.levelTwo},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''"> |
| | | and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%') |
| | | </if> |
| | | order by a.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | <select id="getOrderReportTotal" > |
| | | SELECT |
| | | CEILING(count(a.id)/#{pageSize}) as 'pageTotal', |
| | | count(a.id) as 'total' |
| | | 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(b.create_time)>=#{startDate} and date(b.create_time) <= #{endDate} |
| | | <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')"> |
| | | and b.order_type like concat('%',#{orderDetail.order.orderType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and b.customer_id like concat('%',#{orderDetail.order.customerId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and b.project like concat('%',#{orderDetail.order.project},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.orderId != null and orderDetail.order.orderId != ''"> |
| | | and b.order_id like concat('%',#{orderDetail.order.orderId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and b.batch like concat('%',#{orderDetail.order.batch},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and a.product_id like concat('%',#{orderDetail.productId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and a.product_name like concat('%',#{orderDetail.productName},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and a.quantity like concat('%',#{orderDetail.quantity},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''"> |
| | | and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and a.shape like concat('%',#{orderDetail.shape},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and a.edging_type like concat('%',#{orderDetail.edgingType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''"> |
| | | and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and a.processing_note like concat('%',#{orderDetail.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.icon != null and orderDetail.order.icon != ''"> |
| | | and b.icon like concat('%',#{orderDetail.order.icon},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.packType != null and orderDetail.order.packType != ''"> |
| | | and b.pack_type like concat('%',#{orderDetail.order.packType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and a.perimeter like concat('%',#{orderDetail.perimeter},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and a.price like concat('%',#{orderDetail.price},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | | and b.al_type like concat('%',#{orderDetail.order.alType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and b.salesman like concat('%',#{orderDetail.order.salesman},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''"> |
| | | and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.creator != null and orderDetail.order.creator != ''"> |
| | | and b.creator like concat('%',#{orderDetail.order.creator},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''"> |
| | | and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''"> |
| | | and d.type_name like concat('%',#{orderDetail.levelOne},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''"> |
| | | and e.type_name like concat('%',#{orderDetail.levelTwo},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''"> |
| | | and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%') |
| | | </if> |
| | | order by a.id desc |
| | | </select> |
| | | |
| | | </mapper> |