| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //åå¹¶æ¾ç¤ºå
¶ä»å |
| | | const handleDynamicColumns = (data,title) => { |
| | | // 1. æ¶éææè¡çotherColumnsåæ®µï¼å»éï¼ |
| | | const allOtherFields = new Set(); |
| | | data.forEach(row => { |
| | | if (!row || !row.otherColumns) return; |
| | | |
| | | let parsedOtherColumns; |
| | | try { |
| | | // æ ¸å¿ï¼å°å符串解æä¸ºJSON |
| | | parsedOtherColumns = JSON.parse(row.otherColumns); |
| | | } catch (e) { |
| | | console.error('è§£æotherColumns失败ï¼', e, 'åå§æ°æ®ï¼', row.otherColumns); |
| | | return; |
| | | } |
| | | |
| | | // 2. ä»è§£æåçJSON䏿¶éåæ®µï¼æ¯ææ°ç»æå¯¹è±¡æ ¼å¼ï¼ |
| | | if (Array.isArray(parsedOtherColumns)) { |
| | | // æ°ç»æ ¼å¼ï¼[{ key: 'field1', label: 'åæ®µ1', value: 'å¼1' }, ...] |
| | | parsedOtherColumns.forEach(item => { |
| | | if (item.key) allOtherFields.add(item.key); |
| | | }); |
| | | } else if (typeof parsedOtherColumns === 'object' && parsedOtherColumns !== null) { |
| | | // å¯¹è±¡æ ¼å¼ï¼{ field1: { label: 'åæ®µ1', value: 'å¼1' }, ... } |
| | | Object.keys(parsedOtherColumns).forEach(key => { |
| | | allOtherFields.add(key); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // 2. çæå¨æååï¼ä½ä¸ºprocessListçchildrenï¼ |
| | | const otherColumns = Array.from(allOtherFields).map(field => { |
| | | // å°è¯è·ååæ®µå¯¹åºçlabelï¼ä¼å
å第ä¸ä¸ªåºç°çlabelï¼ |
| | | let label=field; |
| | | title.forEach(item=>{ |
| | | if(field==item.column){ |
| | | label=item.alias |
| | | } |
| | | }) |
| | | return { |
| | | title: label, |
| | | field: `otherColumnsJson.${field}`, |
| | | width: 120, |
| | | align: 'center', |
| | | // å¤çåæ®µå¼æ¾ç¤ºï¼å
¼å®¹æ°ç»/对象类åçotherColumnsï¼ |
| | | formatter: ({ row }) => { |
| | | return row.otherColumnsJson?.[field] || ''; |
| | | |
| | | } |
| | | }; |
| | | }); |
| | | |
| | | // 3. å®ä¹ç¶çº§åprocessListï¼å
å«å¨æåå |
| | | const processList = { |
| | | title: t('å
¶ä»å'), |
| | | field: 'process', |
| | | children: otherColumns // å°å¨æåä½ä¸ºåå |
| | | }; |
| | | |
| | | // 4. å
ç§»é¤å·²åå¨çprocessåï¼é¿å
éå¤ï¼ï¼åæ·»å æ°å |
| | | gridOptions.columns = gridOptions.columns.filter(col => col.field !== 'process'); |
| | | gridOptions.columns.push(processList); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | watch(props, (newVal) => { |
| | |
| | | basicProp.value.pageTotal = res.data.total.pageTotal |
| | | basicProp.value.dataTotal = res.data.total.total |
| | | orderInfo.reportFormDate = res.data.selectDate |
| | | |
| | | //订åæç»æ¥è¡¨ |
| | | if (props.childrenData.url === '/order/getOrderReport') { |
| | | const dataList = res.data.data || []; |
| | | handleDynamicColumns(dataList,res.data.title) |
| | | } |
| | | } |
| | | }) |
| | | return |
| | |
| | | basicProp.value.pageTotal = res.data.total.pageTotal |
| | | basicProp.value.dataTotal = res.data.total.total |
| | | orderInfo.reportFormDate = res.data.selectDate |
| | | |
| | | |
| | | } |
| | | }) |
| | | } |
| | |
| | | <template #title> |
| | | <span style="font-weight: bold" v-show="showTitle"> |
| | | {{ row.orderId }} |
| | | {{ row.project?'--':'' }} |
| | | {{ row.customerName?'--':'' }} |
| | | {{ row.customerName}} |
| | | {{row.project?'--':'' }} |
| | | {{row.project}} |
| | | {{ row.batch?'--':'' }} |
| | | {{row.batch}} |
| | |
| | | <template #title> |
| | | <span style="font-weight: bold" v-show="showTitle"> |
| | | {{ row.orderId }} |
| | | {{ row.customerName?'--':'' }} |
| | | {{ row.customerName}} |
| | | {{ row.project?'--':'' }} |
| | | {{row.project}} |
| | | {{ row.batch?'--':'' }} |
| | |
| | | |
| | | </th> |
| | | <th colspan="2" style="text-align: left;font-weight: bold;" v-if="company.showDeliveryCreator">åè´§åå·ï¼<span>{{delivery.deliveryId}}</span></th> |
| | | <th colspan="2" style="text-align: left;font-weight: bold;" v-else></th> |
| | | </tr> |
| | | <tr> |
| | | <th style="text-align: left;border:none;font-weight: bold;" colspan="4">客æ·åç§°ï¼<span>{{delivery.customerName}}</span></th> |
| | |
| | | }, |
| | | }, |
| | | hideButton:'true',//æµç¨å¡æå°ç颿鮿¯å¦æ¾ç¤º |
| | | getSelectFlowCard:1,//æµç¨å¡æå°æ¥è¯¢æ¯å¦åå¹¶ 1åå¹¶2ä¸åå¹¶ |
| | | getSelectFlowCard:2,//æµç¨å¡æå°æ¥è¯¢æ¯å¦åå¹¶ 1åå¹¶2ä¸åå¹¶ |
| | | columnsLabel:2,//ä¸è¡ä¸¤åæåæ ç¾ 1æ°çä¸è¡ä¸¤åæåæ ç¾ï¼2å
¶å® |
| | | }, |
| | | |
| | |
| | | {field: 'orderDetail.width', width: '100',title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.height',width: '100', title: t('order.height'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'area',width: '100', title: t('order.computeGrossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'squareMillimeter',width: '100', title: t('å¹³æ¹æ¯«ç±³')}, |
| | | {field: 'money',width: '100', title: t('order.grossAmount'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project',width: '100', title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.customerName',width: '100', title: t('order.customers'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | url :'/finishedGoodsInventory/getSelectFinishedOperateLogReport/å
¥åº', |
| | | exportUrl :'/finishedGoodsInventory/exportFinishedOperateLogReport/å
¥åº', |
| | | exportName:t('stockReport.finishedProductInventoryReport'), |
| | | footList:['quantity','area','money'] |
| | | footList:['quantity','area','money','squareMillimeter'] |
| | | }) |
| | | |
| | | </script> |
| | |
| | | {field: 'order.customerName',width: '100', title: t('order.customers'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.orderType',width: '100', title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'area',width: '100', title: t('order.computeGrossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'squareMillimeter',width: '100', title: t('å¹³æ¹æ¯«ç±³')}, |
| | | {field: 'orderDetail.productId',width: '100', title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.productName',width: '140', title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.width', width: '100',title: t('order.width'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | |
| | | url :'/finishedGoodsInventory/getSelectFinishedOperateLogReport/åºåº', |
| | | exportUrl :'/finishedGoodsInventory/exportFinishedOperateLogReport/åºåº', |
| | | exportName:t('stockReport.finishedProductOutboundReport'), |
| | | footList:['quantity','area'] |
| | | footList:['quantity','area','squareMillimeter'] |
| | | }) |
| | | |
| | | </script> |
| | |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | |
| | | :deep(.el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | </style> |
| | |
| | | {field: 'glass_child', title: t('reportingWorks.glassChild'),width:110,filters: [{data: ''}],slots: {filter: 'num1_filter'}, filterMethod: filterChanged}, |
| | | {field: 'reporting_work_id', title: t('reportingWorks.reportingWorkId'),width:120,filters: [{data: ''}],slots: {filter: 'num1_filter'}, filterMethod: filterChanged}, |
| | | {field: 'create_time', title: t('basicData.reportData'),width:120}, |
| | | { |
| | | field: 'print_num', |
| | | title: t('processCard.printStatus'), |
| | | width: 120 |
| | | }, |
| | | ],//表头æé® |
| | | |
| | | toolbarConfig: { |
| | |
| | | |
| | | // ç嬿å°å®æäºä»¶ |
| | | const printNumber = () =>{ |
| | | |
| | | selectRecordsData.value.printList=selectRecords |
| | | let printState=0 |
| | | request.post(`/processCard/updatePrintState/${printState}`, selectRecordsData.value).then((res) => { |
| | | const $grid = xGrid.value |
| | | selectRecords = $grid.getCheckboxRecords() |
| | | request.post(`/Replenish/updatePrintNum`, selectRecords).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | } else { |
| | | |
| | |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContent" :icon="Printer" circle /> |
| | | <el-button v-print="printContent" :icon="Printer" circle @click="printNumber"/> |
| | | </template> |
| | | <print-process id="child" :printList="printRow.list" :printMerge="printRow.printMergeVal" :printLike="printRow.like" |
| | | :mergeTechnologyNumber="printRow.mergeTechnologyNumber" |
| | |
| | | } |
| | | }) |
| | | // è®¡ç®æ»ä»· |
| | | product.totalPrice = details.reduce((sum, d) => sum + (d.materialPric || 0), 0) |
| | | product.totalPrice = details.reduce((sum, d) => sum + (d.materialPric || 0) , 0) |
| | | }) |
| | | dialogTableVisible.value = true |
| | | } |
| | |
| | | import { ref} from "vue" |
| | | import request from "@/utils/request" |
| | | import {useI18n} from "vue-i18n"; |
| | | import {filterChanged} from "@/hook"; |
| | | |
| | | const { t } = useI18n() |
| | | const childrenData = ref({ |
| | |
| | | {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: 'orderNumber',width:120, title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | // {field: 'buildingNumber',width:120, title: '楼å·',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'buildingNumber',width:120, title: t('order.buildingNumber'),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: 'quantity',width:120, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | //åæ°ï¼ç¸åºçæ°æ®ï¼å®ä½ç±»ä¿¡æ¯ï¼ç¸åºçæ¹æ³ï¼æ°æ®è·åï¼ï¼çæçexcelåå |
| | | DownExcel.download(response, exportReplenishDTO.class, replenishService.exportReplenishSv(dates), "PatchLogAddDTO"); |
| | | } |
| | | |
| | | @ApiOperation("ä¿®æ¹æå°æ¬¡æ°") |
| | | @PostMapping("/updatePrintNum") |
| | | public Result updatePrintNum( |
| | | @RequestBody List<Map<String, Object>> object |
| | | ) { |
| | | |
| | | return Result.success(replenishService.updatePrintNumSv(object)); |
| | | } |
| | | } |
| | |
| | | throw new ServiceException(Constants.Code_600, "ä¸å·¥åºå·²å®å·¥æ°éå°äºæ¬å·¥åºæ¥å·¥æ°éï¼è¯·æ£æ¥"); |
| | | } |
| | | } |
| | | @ApiOperation("mesæ¥å·¥æ¥å£æµè¯") |
| | | @PostMapping ("/mesReportingWork1") |
| | | @ApiOperation("mesæ¥å·¥æ¥å£Redis") |
| | | @PostMapping ("/mesReportingWorkRedis") |
| | | public Result mesReportingWorkSvToRedis(@RequestBody Map<String,Object> reportingWork) throws JsonProcessingException, InterruptedException { |
| | | return reportingWorkService.mesReportingWorkSvToRedis(reportingWork); |
| | | } |
| | |
| | | package com.example.erp.dto.mm; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | private Double height; |
| | | @ExcelProperty("é¢ç§¯") |
| | | private Double area; |
| | | @ExcelProperty("å¹³æ¹æ¯«ç±³") |
| | | private Double squareMillimeter; |
| | | @ExcelProperty("éé¢") |
| | | private Double money; |
| | | @ExcelProperty("项ç®åç§°") |
| | |
| | | private String productName; |
| | | @ExcelProperty("订ååºå·") |
| | | private Integer orderNumber; |
| | | @ExcelProperty("楼å±ç¼å·") |
| | | private String buildingNumber; |
| | | @ExcelProperty("宽") |
| | | private Double width; |
| | | @ExcelProperty("é«") |
| | |
| | | @TableField(select = false,exist = false) |
| | | private Integer quantityAvailable; |
| | | |
| | | /*å¹³æ¹æ¯«ç±³*/ |
| | | @TableField(select = false,exist = false) |
| | | private Double squareMillimeter; |
| | | |
| | | /*æ¤éæ°é*/ |
| | | @TableField(select = false,exist = false) |
| | | private Integer cancelAvailable; |
| | |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Data |
| | | @TableName("sd.`order_detail`") |
| | |
| | | private Integer landingSequence; |
| | | @TableField(exist= false,select = false) |
| | | private Double thickness; |
| | | @TableField(exist= false,select = false) |
| | | private Map<String, Object> otherColumnsJson; |
| | | |
| | | //ç¨äºæºè½åæ¶ |
| | | @TableField(exist= false,select = false) |
| | |
| | | import com.example.erp.entity.pp.PatchLog; |
| | | import com.example.erp.entity.pp.ReportingWork; |
| | | import com.github.yulichang.base.MPJBaseMapper; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | Integer selectProjectCount(String processId, String patchId, Integer technologyNumber); |
| | | |
| | | List<exportReplenishDTO> exportReplenishMp(List<LocalDate> dates); |
| | | |
| | | Boolean updatePrintNumMp(Integer id); |
| | | } |
| | | |
| | |
| | | |
| | | List<Map<String, String>> getOrderBomDataMp(String orderId); |
| | | |
| | | List<Map<String, String>> getBOMDetails(Integer productId); |
| | | List<Map<String, String>> getBOMDetails(Integer productId, String orderId); |
| | | |
| | | List<Map<String, String>> getOrderBomSumDataMp(String orderId); |
| | | |
| | |
| | | public class ScheduledTasks { |
| | | private final ReportingWorkService reportingWorkService; |
| | | |
| | | // @Scheduled( fixedRate = 2*60*1000) |
| | | // public void reportingWorkRedisToMysql() throws InterruptedException { |
| | | // reportingWorkService.redisToMysqlReportingWork(); |
| | | // } |
| | | @Scheduled( fixedRate = 2*60*1000) |
| | | public void reportingWorkRedisToMysql() throws InterruptedException { |
| | | reportingWorkService.redisToMysqlReportingWork(); |
| | | } |
| | | } |
| | |
| | | materialInventoryMapper.insertMaterialOutbound(materialOutbound, oddNumber); |
| | | log.setFunction("saveMaterialOutboundæ°å¢:"+oddNumber); |
| | | } |
| | | |
| | | //è·å对象éå循ç¯è¿è¡æ°å¢ä¿®æ¹ |
| | | |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | return "false1"; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | public Object appGetStockList() { |
| | | ExecutorService executor = Executors.newFixedThreadPool(2); |
| | | AtomicReference<List<MaterialInventory>> materialInventoryList = new AtomicReference<>(new ArrayList<MaterialInventory>()); |
| | | executor.execute(() -> { |
| | | materialInventoryList.set(materialInventoryMapper.selectGetStockList()); |
| | | }); |
| | | List<Object> list = new ArrayList<>(); |
| | | executor.shutdown(); |
| | | //ExecutorService executor = Executors.newFixedThreadPool(2); |
| | | List<MaterialInventory> materialInventoryList = materialInventoryMapper.selectGetStockList(); |
| | | //executor.shutdown(); |
| | | |
| | | Map<String, Object> totalSum = new HashMap<>(); |
| | | |
| | | Integer inventoryQuantity = 0; |
| | | Integer availableQuantity = 0; |
| | | Double totalArea = 0.00; |
| | | for (MaterialInventory materialInventory : materialInventoryList.get()) { |
| | | for (MaterialInventory materialInventory : materialInventoryList) { |
| | | inventoryQuantity += materialInventory.getInventoryQuantity(); |
| | | availableQuantity += materialInventory.getAvailableQuantity(); |
| | | totalArea += materialInventory.getTotalArea(); |
| | |
| | | public List<exportReplenishDTO> exportReplenishSv(List<LocalDate> dates) { |
| | | return patchMapper.exportReplenishMp(dates); |
| | | } |
| | | |
| | | public Boolean updatePrintNumSv(List<Map<String, Object>> list) { |
| | | if (!list.isEmpty()){ |
| | | for (Map<String, Object> item : list) { |
| | | Integer id = (Integer) item.get("id"); |
| | | patchMapper.updatePrintNumMp(id); |
| | | } |
| | | return true; |
| | | }else { |
| | | return false; |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | if (!orderDetailsList.isEmpty()) { |
| | | for (OrderDetail od : orderDetailsList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", bomDataMapper.getBOMDetails(od.getProductId())); |
| | | itemmap.put("data", bomDataMapper.getBOMDetails(od.getProductId(),od.getOrderId())); |
| | | list.add(itemmap); |
| | | |
| | | } |
| | |
| | | private final WorkOrderMapper workOrderMapper; |
| | | private final FlowCardMapper flowCardMapper; |
| | | |
| | | private final BasicOtherMoneyMapper basicOtherMoneyMapper; |
| | | |
| | | private final OrderProcessDetailMapper orderProcessDetailMapper; |
| | | public OrderService(OrderMapper orderMapper, OrderDetailMapper orderDetailMapper, OrderGlassDetailMapper orderGlassDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, SysErrorService sysErrorService, OrderOtherMoneyMapper orderOtherMoneyMapper, ProductMapper productMapper, LogService logService, WorkOrderMapper workOrderMapper, FlowCardMapper flowCardMapper) { |
| | | public OrderService(OrderMapper orderMapper, OrderDetailMapper orderDetailMapper, OrderGlassDetailMapper orderGlassDetailMapper, OrderProcessDetailMapper orderProcessDetailMapper, SysErrorService sysErrorService, OrderOtherMoneyMapper orderOtherMoneyMapper, ProductMapper productMapper, LogService logService, WorkOrderMapper workOrderMapper, FlowCardMapper flowCardMapper, BasicOtherMoneyMapper basicOtherMoneyMapper) { |
| | | this.orderMapper = orderMapper; |
| | | this.orderDetailMapper = orderDetailMapper; |
| | | this.orderGlassDetailMapper = orderGlassDetailMapper; |
| | |
| | | this.logService = logService; |
| | | this.workOrderMapper = workOrderMapper; |
| | | this.flowCardMapper = flowCardMapper; |
| | | this.basicOtherMoneyMapper = basicOtherMoneyMapper; |
| | | } |
| | | |
| | | public boolean saveOrder(Map<String,Object> orderMap) throws Exception { |
| | |
| | | endDate = selectDate.get(1); |
| | | } |
| | | } |
| | | List<OrderDetail> orderDetailList = orderDetailMapper.getOrderReport(offset, pageSize, startDate, endDate, orderDetail,model,scope); |
| | | List<BasicOtherMoney> basicOtherMoneyList=basicOtherMoneyMapper.selectList(new QueryWrapper<BasicOtherMoney>()); |
| | | ObjectMapper objectMapper = new ObjectMapper(); |
| | | |
| | | for (OrderDetail detail : orderDetailList) { |
| | | String otherColumnsStr = detail.getOtherColumns(); |
| | | if (otherColumnsStr == null || otherColumnsStr.trim().isEmpty()||otherColumnsStr.equals("{}")) { |
| | | continue; // è·³è¿ç©ºå¼ |
| | | } |
| | | try { |
| | | // è§£æä¸ºMapï¼ä¹å¯è§£æä¸ºèªå®ä¹å®ä½ç±»ï¼å¦OtherColumnsDTOï¼ |
| | | Map<String, Object> otherColumnsJson = objectMapper.readValue(otherColumnsStr, Map.class); |
| | | |
| | | detail.setOtherColumnsJson(otherColumnsJson); |
| | | } catch (JsonProcessingException e) { |
| | | System.err.println("è§£æotherColumnså¤±è´¥ï¼æ°æ®ï¼" + otherColumnsStr + "ï¼é误ï¼" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",orderDetailMapper.getOrderReport(offset, pageSize, startDate, endDate, orderDetail,model,scope)); |
| | | map.put("data",orderDetailList); |
| | | map.put("title",basicOtherMoneyList); |
| | | map.put("total",orderDetailMapper.getOrderReportTotal(offset, pageSize, startDate, endDate, orderDetail,"order")); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | |
| | | <result column="process_id" property="processId"/> |
| | | <result column="money" property="money"/> |
| | | <result column="area" property="area"/> |
| | | <result column="square_millimeter" property="squareMillimeter"/> |
| | | |
| | | <result column="width" property="orderDetail.width"/> |
| | | <result column="height" property="orderDetail.height"/> |
| | |
| | | o.customer_name, |
| | | o.project, |
| | | od.price, |
| | | o.order_type |
| | | o.order_type, |
| | | p.thickness * fol.area as square_millimeter |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.status!='å·²ä½åº') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | left join sd.product p on p.id=od.product_id |
| | | <where> |
| | | date(fol.operate_time)>=#{startDate} and date(fol.operate_time) <= #{endDate} and fol.operate_type=#{type} |
| | | <if test="finishedOperateLog.operateType != null and finishedOperateLog.operateType != ''"> |
| | |
| | | from mm.finished_operate_log aa where aa.status!='å·²ä½åº') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | left join sd.product p on p.id=od.product_id |
| | | <where> |
| | | date(fol.operate_time)>=#{startDate} and date(fol.operate_time) <= #{endDate} and fol.operate_type=#{type} |
| | | <if test="finishedOperateLog.operateType != null and finishedOperateLog.operateType != ''"> |
| | |
| | | o.customer_name, |
| | | o.project, |
| | | od.price, |
| | | o.order_type |
| | | o.order_type, |
| | | p.thickness * fol.area as square_millimeter |
| | | from (select * |
| | | from mm.finished_operate_log aa where aa.status!='å·²ä½åº') fol |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | left join sd.product p on p.id=od.product_id |
| | | where date(fol.operate_time)>=#{dates[0]} and date(fol.operate_time) <= #{dates[1]} and fol.operate_type=#{type} |
| | | |
| | | </select> |
| | |
| | | </select> |
| | | |
| | | <select id="selectReplenishPrintMp"> |
| | | select fc.id, |
| | | select pl.id, |
| | | fc.order_id, |
| | | fc.process_id, |
| | | o.customer_name, |
| | |
| | | pl.reporting_work_id, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | pl.patch_id, |
| | | date(pl.create_time) as create_time |
| | | date(pl.create_time) as create_time, |
| | | pl.print_num |
| | | |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | |
| | | pd.separation, |
| | | fc.technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | od.building_number, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | fc.technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number, |
| | | fc.merge as merge |
| | | fc.merge as merge, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | pd.separation, |
| | | #{compound} as technology_number, |
| | | IFNULL(JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')),'') as mapNumber, |
| | | od.building_number |
| | | od.building_number, |
| | | od.weight |
| | | from flow_card as fc |
| | | left join sd.order_glass_detail as ogd |
| | | on fc.order_id = ogd.order_id and fc.order_number = ogd.order_number and |
| | |
| | | </where> |
| | | order by r.review_status,r.id desc |
| | | </select> |
| | | |
| | | <update id="updatePrintNumMp"> |
| | | update pp.patch_log set print_num=IFNULL(print_num,0)+1 where id=#{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | |
| | | <select id="getOrderBomDataMp"> |
| | | SELECT product_id,product_name,SUM(quantity) as quantity, |
| | | SUM(gross_area) as area,SUM(perimeter) as perimeter from sd.order_detail where order_id=#{orderId} |
| | | SUM(gross_area) as area,SUM(perimeter) as perimeter,order_id from sd.order_detail where order_id=#{orderId} |
| | | GROUP BY product_id |
| | | </select> |
| | | |
| | | <select id="getBOMDetails"> |
| | | select *,(consume*price) as materialPric from sd.bom_product as bp left join sd.bom_base as bb on bb.id=bp.base_id |
| | | where bp.product_id = #{productId} ORDER BY product_layer |
| | | select bp.*,bb.*,(consume*price) as materialPric,od.quantity from sd.bom_product as bp |
| | | left join sd.bom_base as bb on bb.id=bp.base_id |
| | | left join ( select order_id,product_id,SUM(quantity) as quantity from sd.order_detail GROUP BY order_id,product_id |
| | | ) as od on od.product_id = bp.product_id |
| | | where bp.product_id = #{productId} and od.order_id = #{orderId} ORDER BY product_layer |
| | | </select> |
| | | |
| | | <select id="getOrderBomSumDataMp"> |
| | |
| | | bb.type, |
| | | sum(bb.consume) as consume, |
| | | sum(bb.price) as price, |
| | | sum(bb.consume * bb.price) AS materialPrice |
| | | sum(bb.consume * bb.price) AS materialPrice, |
| | | od.quantity |
| | | FROM |
| | | sd.bom_product AS bp |
| | | LEFT JOIN sd.bom_base AS bb ON bb.id = bp.base_id |
| | | LEFT JOIN ( |
| | | select order_id,product_id from sd.order_detail GROUP BY product_id |
| | | select order_id,product_id,SUM(quantity) as quantity from sd.order_detail GROUP BY order_id,product_id |
| | | ) as od on od.product_id = bp.product_id |
| | | |
| | | WHERE od.order_id=#{orderId} |
| | |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''"> |
| | | and a.building_number like concat('%',#{orderDetail.buildingNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != '' and model==0"> |
| | | and a.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.buildingNumber != null and orderDetail.buildingNumber != ''"> |
| | | and a.building_number like concat('%',#{orderDetail.buildingNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |