| | |
| | | } |
| | | } |
| | | } |
| | | console.log(lastList.value) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | <span>{{ item.project }}</span> |
| | | <span>{{ item.buildingNumber }}</span> |
| | | </div> |
| | | <div class="row3" v-if="item.other_columns==null||JSON.parse(item.other_columns).S02==null">{{item.width}}x{{item.height}}={{item.quantity}}</div> |
| | | <div class="row3" v-else>{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div> |
| | | <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)">{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div> |
| | | <div class="row3" v-else>{{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}}</div> |
| | | <div class="row5"> |
| | | <span>{{item.remarks}}</span> |
| | | <span>{{ item.processingNote }}</span> |
| | |
| | | <span>{{ item.project }}</span> |
| | | <span>{{ item.buildingNumber }}</span> |
| | | </div> |
| | | <div class="row3" v-if="item.other_columns==null||JSON.parse(item.other_columns).S02==null">{{item.width}}x{{item.height}}={{item.quantity}}</div> |
| | | <div class="row3" v-else>{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div> |
| | | <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)">{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div> |
| | | <div class="row3" v-else>{{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}}</div> |
| | | <div class="row5"> |
| | | <span>{{item.remarks}}</span> |
| | | <span>{{ item.processingNote }}</span> |
| | |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | |
| | | if (lableTypes==1){ |
| | | |
| | | labelRow.value.list=JSON.stringify(selectRecords) |
| | | labelRow.value.faceOrientation=faceOrientation |
| | | labelRow.value.type=type |
| | | labelRow.value.lableType= lableTypes |
| | | dialogTableVisibleLabel.value=true |
| | | //router.push({path: '/main/processCard/PrintCustomLabel', query: {type:type,faceOrientation:faceOrientation,lableType:lableTypes, printList: JSON.stringify(selectRecords)}}) |
| | | if(company.label===1){ |
| | | dialogTableVisibleLabel.value=true |
| | | }else if(company.label===2){ |
| | | router.push({path: '/main/processCard/PrintCustomLabel', query: {type:type,faceOrientation:faceOrientation,lableType:lableTypes, printList: JSON.stringify(selectRecords)}}) |
| | | } |
| | | |
| | | } |
| | | else if (lableTypes==2) { |
| | |
| | | labelRow.value.faceOrientation=faceOrientation |
| | | labelRow.value.type=type |
| | | labelRow.value.lableType= lableTypes |
| | | dialogTableVisibleCustomLabel.value=true |
| | | //router.push({path: '/main/processCard/PrintCustomLabelSemi', query: {type:type,faceOrientation:faceOrientation,lableType:lableTypes, printList: JSON.stringify(selectRecords)}}) |
| | | |
| | | if(company.label===1){ |
| | | dialogTableVisibleCustomLabel.value=true |
| | | }else if(company.label===2){ |
| | | router.push({path: '/main/processCard/PrintCustomLabelSemi', query: {type:type,faceOrientation:faceOrientation,lableType:lableTypes, printList: JSON.stringify(selectRecords)}}) |
| | | } |
| | | }else |
| | | if (lableTypes==3) { |
| | | router.push({path: '/main/processCard/PrintLabel1', query: {type:type,faceOrientation:faceOrientation,lableType:lableTypes, printList: JSON.stringify(selectRecords)}}) |
| | |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | let router=useRouter() |
| | | let rowClickIndex = ref(null) |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | menuConfig: { |
| | | body: { |
| | | options: [ |
| | | [ |
| | | { code: 'sheet1', name: '订单', prefixIcon: 'vxe-icon-file-txt', visible: true}, |
| | | { code: 'sheet2', name: '发货', prefixIcon: 'vxe-icon-file-txt', visible: true}, |
| | | ] |
| | | ] |
| | | } |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | |
| | | |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | |
| | | menuClick ({ menu, row, column }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | | case 'sheet1': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning("未查询到客户信息") |
| | | return |
| | | } |
| | | router.push({path: '/main/customer/selectCustomerOrder', query: { id: row.id,type:1 }}) |
| | | break |
| | | |
| | | } |
| | | case 'sheet2': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning("未查询到客户信息") |
| | | return |
| | | } |
| | | router.push({path: '/main/customer/selectCustomerOrder', query: { id: row.id,type:2 }}) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | cellClick({ row }){ |
| | | rowClickIndex.value = row |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | </script> |
| | |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | > |
| | | <!-- 下拉显示所有信息插槽--> |
| | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | order:{ |
| | | customerId:'' |
| | | } |
| | | customerId:'', |
| | | batch:'', |
| | | }, |
| | | |
| | | |
| | | }) |
| | |
| | | const str = route.query.id |
| | | if (typeof str != 'undefined' && str != null && str !== '' && str !== '\n' && str !== '\r'){ |
| | | filterData.value.order.customerId = Number(str) |
| | | |
| | | filterData.value.order.batch=route.query.type |
| | | request.post(`/customer/getSelectCustomerOderDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | | console.log(res.data.total) |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | selectDate.value = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | console.log(res.data.total) |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | |
| | | {type:'expand',slots: { content:'content' },width: 60,fixed:"left"}, |
| | | {type: 'seq', title: t('basicData.Number'), width: 80 ,fixed:"left"}, |
| | | |
| | | {field: 'orderId',width:120, title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.customerId',width:120, title: t('customer.customerNumber')}, |
| | | {field: 'order.customerName',width:120, title: t('customer.customerName')}, |
| | | {field: 'order_id',width:120, title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery_id',width:120, title: t('delivery.deliveryNoteId')}, |
| | | {field: 'customer_id',width:120, title: t('customer.customerNumber')}, |
| | | {field: 'customer_name',width:120, title: t('customer.customerName')}, |
| | | {field: 'quantity',width:120, title: t('order.quantity')}, |
| | | {field: 'productId',width:120, title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'productName',width:120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'shape',width:120, title: t('order.shape'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'width',width:120, title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'height',width:120, title: t('order.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.project',width:120, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.batch',width:120, title: t('order.batch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.money',width:120, title: t('customer.orderAmount'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'product_id',width:120, title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'product_name',width:120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'project',width:120, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'money',width:120, title: t('customer.orderAmount'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'area',width:120, title: t('productStock.totalArea')}, |
| | | {field: 'order.orderType',width:120, title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.salesman',width:120, title:t('order.salesman'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.createTime',width:120, title:t('basicData.creationTime')}, |
| | | {field: 'create_time',width:120, title:t('basicData.creationTime')}, |
| | | |
| | | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | ], |
| | | buttons: [], |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | /*import: false, |
| | | export: true, |
| | | print: true,*/ |
| | |
| | | } |
| | | } |
| | | |
| | | const exportExcel = () => { |
| | | if(filterData.value.order.batch==='1'){ |
| | | request.post(`/customer/exportSelectCustomerOderDate/${selectDate.value}`,filterData.value,{responseType :'blob'}).then(res => { |
| | | const blob = new Blob([res]) |
| | | if ('download' in document.createElement('a')) { // 非IE下载 |
| | | const elink = document.createElement('a') |
| | | elink.download = `客户订单.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) |
| | | } |
| | | }) |
| | | }else{ |
| | | request.post(`/customer/exportSelectCustomerDeliveryDate/${selectDate.value}`,filterData.value,{responseType :'blob'}).then(res => { |
| | | const blob = new Blob([res]) |
| | | if ('download' in document.createElement('a')) { // 非IE下载 |
| | | const elink = document.createElement('a') |
| | | elink.download = `客户发货.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) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | |
| | | |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | |
| | | <vxe-grid |
| | | max-height="97%" |
| | | class="mytable-scrollbar" |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel()"> |
| | | {{$t('basicData.export')}}</vxe-button> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.dto.sd.CustomerDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailProductDTO; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.Order; |
| | |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.sd.CustomerService; |
| | | import com.example.erp.service.sd.DeliveryService; |
| | | import com.example.erp.tools.DownExcel; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | return Result.seccess(customerService.getSelectCustomerOderDate(pageNum,pageSize,selectDate,orderDetail)); |
| | | } |
| | | |
| | | @ApiOperation("客户订单报表") |
| | | @PostMapping("/exportSelectCustomerOderDate/{selectDate}") |
| | | public void exportSelectCustomerOderDate(HttpServletResponse response, @PathVariable List<String> selectDate, @RequestBody OrderDetail orderDetail) throws IOException, IllegalAccessException, InstantiationException { |
| | | DownExcel.download(response, CustomerDTO.class, customerService.exportSelectCustomerOderDate(selectDate,orderDetail),"orderReport"); |
| | | } |
| | | |
| | | @ApiOperation("客户发货报表") |
| | | @PostMapping("/exportSelectCustomerDeliveryDate/{selectDate}") |
| | | public void exportSelectCustomerDeliveryDate(HttpServletResponse response, @PathVariable List<String> selectDate, @RequestBody OrderDetail orderDetail) throws IOException, IllegalAccessException, InstantiationException { |
| | | DownExcel.download(response, CustomerDTO.class, customerService.exportSelectCustomerDeliveryDate(selectDate,orderDetail),"deliveryReport"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
New file |
| | |
| | | package com.example.erp.dto.sd; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | |
| | | @Data |
| | | public class CustomerDTO { |
| | | @ExcelProperty("客户名称") |
| | | private String customerName; |
| | | @ExcelProperty("报表日期") |
| | | private LocalDate createTime; |
| | | @ExcelProperty("发货单号") |
| | | private String deliveryId; |
| | | @ExcelProperty("销售单号") |
| | | private String productName; |
| | | @ExcelProperty("项目名称") |
| | | private String orderId; |
| | | @ExcelProperty("产品") |
| | | private String project; |
| | | @ExcelProperty("数量") |
| | | private Integer quantity; |
| | | @ExcelProperty("面积") |
| | | private Double area; |
| | | @ExcelProperty("单价") |
| | | private Integer price; |
| | | @ExcelProperty("金额") |
| | | private Double money; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.example.erp.dto.sd.CustomerDTO; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | |
| | | |
| | | Boolean deleteCustomer(@Param("customer") Customer customer); |
| | | |
| | | List<OrderDetail> getSelectCustomerOderDate(@Param("offset") Integer offset, |
| | | List<Map<String,Object>> getSelectCustomerOderDate(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, String startDate, String endDate, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | |
| | | List<Map<String,Object>> getSelectCustomerDeliveryDate(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, String startDate, String endDate, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | |
| | | Map<String,Integer> getSelectCustomerOderDatePageTotal(Integer offset, Integer pageSize,String startDate, String endDate, OrderDetail orderDetail); |
| | | |
| | | Map<String,Integer> getSelectCustomerDeliveryDatePageTotal(Integer offset, Integer pageSize,String startDate, String endDate, OrderDetail orderDetail); |
| | | |
| | | List<CustomerDTO> exportSelectCustomerOderDate(String startDate, String endDate, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | |
| | | List<CustomerDTO> exportSelectCustomerDeliveryDate(String startDate, String endDate, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.dto.sd.CustomerDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailProductDTO; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | |
| | | } |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", customerMapper.getSelectCustomerOderDate(offset, pageSize,startDate,endDate, orderDetail)); |
| | | map.put("total", customerMapper.getSelectCustomerOderDatePageTotal(offset, pageSize,startDate,endDate, orderDetail)); |
| | | if(Objects.equals(orderDetail.getOrder().getBatch(), "1")){ |
| | | map.put("data", customerMapper.getSelectCustomerOderDate(offset, pageSize,startDate,endDate, orderDetail)); |
| | | map.put("total", customerMapper.getSelectCustomerOderDatePageTotal(offset, pageSize,startDate,endDate, orderDetail)); |
| | | }else{ |
| | | map.put("data", customerMapper.getSelectCustomerDeliveryDate(offset, pageSize,startDate,endDate, orderDetail)); |
| | | map.put("total", customerMapper.getSelectCustomerDeliveryDatePageTotal(offset, pageSize,startDate,endDate, orderDetail)); |
| | | } |
| | | |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | |
| | | return map; |
| | | } |
| | | |
| | | public List<CustomerDTO> exportSelectCustomerOderDate(List<String> selectDate, OrderDetail orderDetail) { |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | | if(selectDate !=null && selectDate.size()==2){ |
| | | if(!selectDate.get(0).isEmpty()){ |
| | | startDate = selectDate.get(0); |
| | | } |
| | | if(!selectDate.get(1).isEmpty()){ |
| | | endDate = selectDate.get(1); |
| | | } |
| | | } |
| | | return customerMapper.exportSelectCustomerOderDate(startDate,endDate, orderDetail); |
| | | } |
| | | |
| | | public List<CustomerDTO> exportSelectCustomerDeliveryDate(List<String> selectDate, OrderDetail orderDetail) { |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | | if(selectDate !=null && selectDate.size()==2){ |
| | | if(!selectDate.get(0).isEmpty()){ |
| | | startDate = selectDate.get(0); |
| | | } |
| | | if(!selectDate.get(1).isEmpty()){ |
| | | endDate = selectDate.get(1); |
| | | } |
| | | } |
| | | return customerMapper.exportSelectCustomerDeliveryDate(startDate,endDate, orderDetail); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S07' )) AS remarks4, |
| | | JSON_UNQUOTE( JSON_EXTRACT( od.other_columns, '$.S08' )) AS remarks5, |
| | | p.remarks as filmNumber, |
| | | od.bend_radius as bendRadius |
| | | od.bend_radius as bendRadius, |
| | | od.other_columns |
| | | from sd.order as o |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join flow_card as fc on o.order_id = fc.order_id and |
| | |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="getSelectCustomerOderDate" resultMap="selectCustomerOrderDetail"> |
| | | select od.order_id, |
| | | od.order_number, |
| | | o.project, |
| | | od.product_id, |
| | | od.product_name, |
| | | o.customer_id, |
| | | o.customer_name, |
| | | sum(od.quantity) as quantity, |
| | | sum(od.area) as area, |
| | | od.shape, |
| | | od.width, |
| | | od.height, |
| | | o.batch, |
| | | sum(od.gross_amount) as money, |
| | | o.order_type, |
| | | o.salesman, |
| | | o.create_time |
| | | from order_detail od |
| | | left join `order` o on o.order_id = od.order_id |
| | | <where> |
| | | and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} |
| | | <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and o.customer_id = #{orderDetail.order.customerId} |
| | | </if> |
| | | <if test="orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and o.project regexp #{orderDetail.order.project} |
| | | </if> |
| | | <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderDetail.order.batch} |
| | | </if> |
| | | <if test="orderDetail.order.money != null and orderDetail.order.money != ''"> |
| | | and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''"> |
| | | and o.order_type regexp #{orderDetail.order.orderType} |
| | | </if> |
| | | <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and o.salesman regexp #{orderDetail.order.salesman} |
| | | </if> |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and od.order_number regexp #{orderDetail.orderNumber} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and od.shape regexp #{orderDetail.shape} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | <select id="getSelectCustomerDeliveryDate" > |
| | | select d.delivery_id,d.order_id,d.customer_id,d.customer_name, |
| | | d.project,od.product_name,sum(dd.quantity) as quantity,sum(dd.area) as area,dd.price,sum(dd.money) as money, |
| | | date(d.create_time) as create_time |
| | | |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on d.delivery_id = dd.delivery_id |
| | | left join sd.order_detail od on od.order_id=dd.order_id and od.order_number=dd.order_number |
| | | |
| | | where date(d.create_time)>=#{startDate} and date(d.create_time) <= #{endDate} |
| | | and d.customer_id = #{orderDetail.order.customerId} |
| | | group by od.product_id, od.width, od.height |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectCustomerDeliveryDatePageTotal" > |
| | | select |
| | | CEILING(count(zu.id)/#{pageSize}) as 'pageTotal', |
| | | count(zu.id) as 'total' from (select od.product_id,od.id |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on d.delivery_id = dd.delivery_id |
| | | left join sd.order_detail od on od.order_id=dd.order_id and od.order_number=dd.order_number |
| | | where |
| | | date(d.create_time)>=#{startDate} and date(d.create_time) <= #{endDate} |
| | | and d.customer_id = #{orderDetail.order.customerId} |
| | | group by od.product_id, od.width, od.height) as zu |
| | | </select> |
| | | |
| | | <select id="getSelectCustomerOderDate" > |
| | | select od.order_id, |
| | | od.order_number, |
| | | o.project, |
| | | od.product_id, |
| | | od.product_name, |
| | | o.customer_id, |
| | | o.customer_name, |
| | | sum(od.quantity) as quantity, |
| | | sum(od.area) as area, |
| | | od.shape, |
| | | od.width, |
| | | od.height, |
| | | o.batch, |
| | | od.price, |
| | | sum(od.gross_amount) as money, |
| | | o.order_type, |
| | | o.salesman, |
| | | date(o.create_time) as create_time |
| | | from order_detail od |
| | | left join `order` o on o.order_id = od.order_id |
| | | <where> |
| | | and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} |
| | | and o.customer_id = #{orderDetail.order.customerId} |
| | | </where> |
| | | group by od.product_id, od.width, od.height |
| | | limit #{offset},#{pageSize}; |
| | |
| | | left join `order` o on o.order_id = od.order_id |
| | | <where> |
| | | and date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} |
| | | <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and o.customer_id = #{orderDetail.order.customerId} |
| | | </if> |
| | | <if test="orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and o.project regexp #{orderDetail.order.project} |
| | | </if> |
| | | <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and o.batch regexp #{orderDetail.order.batch} |
| | | </if> |
| | | <if test="orderDetail.order.money != null and orderDetail.order.money != ''"> |
| | | and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''"> |
| | | and o.order_type regexp #{orderDetail.order.orderType} |
| | | </if> |
| | | <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and o.salesman regexp #{orderDetail.order.salesman} |
| | | </if> |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and od.order_number regexp #{orderDetail.orderNumber} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and od.shape regexp #{orderDetail.shape} |
| | | </if> |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and od.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and od.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | |
| | | </where> |
| | | group by od.product_id, od.width, od.height) as zu |
| | | </select> |
| | |
| | | <delete id="deleteCustomer" > |
| | | delete from sd.customer where id=#{customer.id} |
| | | </delete> |
| | | |
| | | <select id="exportSelectCustomerDeliveryDate" > |
| | | select d.delivery_id,d.order_id,d.customer_id,d.customer_name, |
| | | d.project,od.product_name,sum(dd.quantity) as quantity,sum(dd.area) as area,dd.price,sum(dd.money) as money, |
| | | date(d.create_time) as create_time |
| | | |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on d.delivery_id = dd.delivery_id |
| | | left join sd.order_detail od on od.order_id=dd.order_id and od.order_number=dd.order_number |
| | | |
| | | where date(d.create_time)>=#{startDate} and date(d.create_time) <= #{endDate} |
| | | and d.customer_id = #{orderDetail.order.customerId} |
| | | group by od.product_id, od.width, od.height |
| | | </select> |
| | | |
| | | <select id="exportSelectCustomerOderDate" > |
| | | select od.order_id, |
| | | o.project, |
| | | od.product_name, |
| | | o.customer_name, |
| | | sum(od.quantity) as quantity, |
| | | sum(od.area) as area, |
| | | od.price, |
| | | sum(od.gross_amount) as money, |
| | | date(o.create_time) as create_time |
| | | from order_detail od |
| | | left join `order` o on o.order_id = od.order_id |
| | | where |
| | | date(o.create_time)>=#{startDate} and date(o.create_time) <= #{endDate} |
| | | and o.customer_id = #{orderDetail.order.customerId} |
| | | group by od.product_id, od.width, od.height |
| | | </select> |
| | | </mapper> |