Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | |
| | | } |
| | | |
| | | const selectRecordsData = ref({ |
| | | printList: [] |
| | | }) |
| | | // 监听打印次数事件 |
| | | const printNumber = () => { |
| | | selectRecordsData.value.printList = JSON.parse(props.list) |
| | | request.post(`/tagStyle/updatePrintNumber`, selectRecordsData.value).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | } else { |
| | | |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | |
| | | } |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button @click="printOrder(2)" :icon="View" circle/> |
| | | <el-button @click="printOrder(1)" :icon="Printer" circle/> |
| | | <el-button @click="printOrder(2);printNumber()" :icon="View" circle/> |
| | | <el-button @click="printOrder(1);printNumber()" :icon="Printer" circle/> |
| | | |
| | | </template> |
| | | <print-custom-label id="childLabel" |
| | |
| | | request.post(`/processCard/selectPrintDetails/${inquiryMode}/${type}`, data.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | let newDataCollection = []; |
| | | for (let i = 0; i < res.data.data.length; i++) { |
| | | res.data.data[i].detail.forEach((item) => { |
| | |
| | | }; |
| | | |
| | | |
| | | // 监听打印完成事件 |
| | | |
| | | // 监听打印次数事件 |
| | | const printNumber = () => { |
| | | |
| | | selectRecordsData.value.printList = selectRecords |
| | | let printState = 0 |
| | | request.post(`/processCard/updatePrintState/${printState}`, selectRecordsData.value).then((res) => { |
| | | request.post(`/processCard/updatePrintNumber`, selectRecordsData.value).then((res) => { |
| | | if (res.code == 200 && res.data === true) { |
| | | } else { |
| | | |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button v-print="printContentLabel" :icon="Printer" circle/> |
| | | <el-button v-print="printContentLabel" :icon="Printer" circle @click="printNumber"/> |
| | | </template> |
| | | <print-custom-label id="childLabel" |
| | | :faceOrientation="labelRow.faceOrientation" |
| | |
| | | "{display:none}@media print{" + |
| | | "@page {" + |
| | | " size: auto; " + |
| | | " margin: 13mm 4mm 2mm 4mm; " + |
| | | " margin: 13mm 4mm 0mm 4mm; " + |
| | | " }body>:not(#" + |
| | | printId + |
| | | "){display:none !important}body>#" + |
| | |
| | | <el-input v-if="!company.showDeliveryCreator" v-model="remarks" style="background-color: transparent;border: none;margin-top: -20px;width: 100px"/> |
| | | <div id="printFlowCard" > |
| | | <!-- 半成品标签--> |
| | | <div v-if="type!=='3'" id="entirety" v-for="(item,id) in labelList" > |
| | | |
| | | <template v-for="(item,id) in labelList"> |
| | | <div v-if="type!=='3'" id="entirety" > |
| | | <div class="row1" > |
| | | <!--钢化版图序号,钢化版图里的顺序--> |
| | | <!-- <div class="cell" v-if="item.heat_layout_id!==undefined">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div>--> |
| | |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="element-to-break-after" v-if="(id+1)%44==0"></div> |
| | | </template> |
| | | |
| | | |
| | | |
| | |
| | | <span style="font-size: 10pt">{{item.glass_child}}</span> |
| | | </div> |
| | | </div> |
| | | <div class="element-to-break-after" v-if="(id+1)%44==0"></div> |
| | | </template> |
| | | |
| | | </div> |
| | |
| | | font-size: 6pt; |
| | | } |
| | | |
| | | .element-to-break-after { |
| | | page-break-after: always; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | let produceList = ref([]) |
| | | let titleStyleVisible = ref(false) |
| | | |
| | | //定义分架状态 |
| | | const optionVal = ref('1') |
| | | const options = [ |
| | | { |
| | | value: '0', |
| | | label: '未分架', |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '已分架', |
| | | }, |
| | | ] |
| | | |
| | | |
| | | const form = reactive({ |
| | | date1: '', |
| | |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | let orderId=form.orderId |
| | | let project=form.project |
| | | |
| | | let state = optionVal.value |
| | | if (orderId==''){ |
| | | orderId=null |
| | | } |
| | |
| | | |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}`, filterData.value).then((res) => { |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}/${state}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | |
| | | if (project==''){ |
| | | project=null |
| | | } |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}`, filterData.value).then((res) => { |
| | | let state = optionVal.value |
| | | |
| | | request.post(`/processCard/selectPrintFlowCard/${startTime}/${endTime}/${orderId}/${project}/${userId}/${state}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | xGrid.value.loadData(res.data.data) |
| | |
| | | //{'code': 'titleStyle', 'name': t('processCard.labelStyle'),status: 'primary'}, |
| | | {code: 'detailsPrint', name: t('processCard.detailPrinting'), status: 'primary'}, |
| | | {code: 'detailsProcessPrint', name: t('processCard.detailsPrintedSeparately'), status: 'primary'}, |
| | | |
| | | {code: 'orderPrint', name: '订单打印', status: 'primary'}, |
| | | ], |
| | | |
| | | zoom: true, |
| | |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | if (optionVal.value != '1'){ |
| | | ElMessage.warning('请选择已分架订单打印') |
| | | return |
| | | } |
| | | let orderIdList = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | if (optionVal.value != '1'){ |
| | | ElMessage.warning('请选择已分架订单打印') |
| | | return |
| | | } |
| | | let orderIdList = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | |
| | | if (optionVal.value != '1'){ |
| | | ElMessage.warning('请选择已分架订单打印') |
| | | return |
| | | } |
| | | let orderIdList = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | |
| | | } |
| | | let array = orderIdList.split('|'); |
| | | router.push({path: '/main/processCard/PrintFlowCardDetails', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value,type:2}}) |
| | | return; |
| | | |
| | | } |
| | | case 'orderPrint': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | if(selectRecords===null ||selectRecords===''||selectRecords.length===0){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | if (optionVal.value != '0'){ |
| | | ElMessage.warning('请选择未分架订单打印') |
| | | return |
| | | } |
| | | let orderIdList = "" |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | if (i + 1 === selectRecords.length) { |
| | | orderIdList += selectRecords[i].order_id |
| | | } else { |
| | | orderIdList += selectRecords[i].order_id + "|" |
| | | } |
| | | } |
| | | let array = orderIdList.split('|'); |
| | | router.push({path: '/main/processCard/PrintFlowCardDetails', query: {printList: JSON.stringify(selectRecords),checkedValue:checkedValue.value.value,type:3}}) |
| | | return; |
| | | |
| | | } |
| | |
| | | |
| | | <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 110px"></el-input> |
| | | |
| | | |
| | | <el-select |
| | | :default-first-option="true" |
| | | ref="getSelect" style="width: 130px" |
| | | v-model="optionVal" |
| | | class="m-2" |
| | | @change="getWorkOrder" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-button |
| | | id="select" |
| | | :icon="Search" |
| | |
| | | |
| | | @ApiOperation("流程卡打印查询接口") |
| | | @SaCheckPermission("selectPrintFlowCard.search") |
| | | @PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}/{userId}") |
| | | @PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}/{userId}/{state}") |
| | | public Result selectPrintFlowCard( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String project, |
| | | @PathVariable String userId, |
| | | @PathVariable Integer state, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project,userId, flowCard)); |
| | | return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project,userId,state, flowCard)); |
| | | } |
| | | |
| | | @ApiOperation("流程卡明细查询接口") |
| | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.TagStyle; |
| | | import com.example.erp.service.pp.TagStyleService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("tagStyle") |
| | |
| | | public Result addTag(@RequestBody TagStyle tagStyle){ |
| | | return Result.seccess(tagStyleService.addTag(tagStyle)); |
| | | } |
| | | |
| | | @ApiOperation("修改标签打印次数") |
| | | @PostMapping("/updatePrintNumber") |
| | | public Result updatePrintNumber( |
| | | @RequestBody Map<String, Object> object |
| | | ) { |
| | | return Result.seccess(tagStyleService.updatePrintNumberSv(object)); |
| | | } |
| | | } |
| | |
| | | @ExcelProperty("产品") |
| | | private String productName; |
| | | @ExcelProperty("数量") |
| | | private Integer quantity; |
| | | private Double quantity; |
| | | @ExcelProperty("面积") |
| | | private Double area; |
| | | @ExcelProperty("单价") |
| | |
| | | Boolean deleteReportingWork(String processId); |
| | | Boolean deleteReportingWorkByOrderId(String orderId); |
| | | |
| | | List<Map<String, String>> selectPrintFlowCardMp(Date selectTime1, Date selectTime2, String orderId, String project, FlowCard flowCard); |
| | | List<Map<String, String>> selectPrintFlowCardMp(Date selectTime1, Date selectTime2, String orderId, String project, Integer state, FlowCard flowCard); |
| | | |
| | | List<Map<String, String>> selectPrintFlowCard(Date selectTime1, Date selectTime2); |
| | | |
| | |
| | | Boolean revokeComposing(String processId); |
| | | |
| | | Integer selectProjectNo(String processId); |
| | | |
| | | List<Map<String, String>> selectPrintDetailsMp2(String orderId); |
| | | |
| | | List<Map<String, Object>> getPrintOrderDataDetails(String orderId, Integer orderNumber, Integer printQuantity); |
| | | |
| | | Boolean updatePrintNumberMp(String processId, Integer orderNumber); |
| | | } |
| | |
| | | sysError.setError(e+Arrays.toString(e.getStackTrace())); |
| | | sysError.setFunc("saveMaterialOutbound"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = "false1"; |
| | | saveState = "false"; |
| | | |
| | | } |
| | | return saveState; |
| | |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailLists) { |
| | | //还原物料库存数 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableInt(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | |
| | | if(materialOutboundDetail.getUseId()!=null){ |
| | | //还原优化工程库存数 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOptInt(materialOutboundDetail.getUseId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Object selectPrintFlowCardSv(Date selectTime1, Date selectTime2, String orderId, String project, String userId, FlowCard flowCard) { |
| | | public Object selectPrintFlowCardSv(Date selectTime1, Date selectTime2, String orderId, String project, String userId, Integer state, FlowCard flowCard) { |
| | | if ("null".equals(orderId)) { |
| | | orderId = ""; |
| | | } |
| | |
| | | project = ""; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectPrintFlowCardMp(selectTime1, selectTime2, orderId, project, flowCard)); |
| | | map.put("data", flowCardMapper.selectPrintFlowCardMp(selectTime1, selectTime2, orderId, project,state, flowCard)); |
| | | String roleId = flowCardMapper.selectUserMp(userId); |
| | | map.put("user", roleId); |
| | | return map; |
| | |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | if (type == 1) { |
| | | if (type == 1) {//明细打印 |
| | | itemmap.put("detail", flowCardMapper.selectPrintDetailsMp(flowCard.getOrderId())); |
| | | } else if (type == 2) { |
| | | } else if (type == 2) {//明细分架打印 |
| | | itemmap.put("detail", flowCardMapper.selectPrintDetailsMp1(flowCard.getOrderId())); |
| | | }else if (type == 3) {//订单打印 |
| | | itemmap.put("detail", flowCardMapper.selectPrintDetailsMp2(flowCard.getOrderId())); |
| | | } |
| | | |
| | | list.add(itemmap); |
| | |
| | | |
| | | if (lableType != 2) {//成品标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | | String orderId = flowCard.getOrderId(); |
| | | String processId = flowCard.getProcessId(); |
| | | String orderNumber = flowCard.getOrderNumber().toString(); |
| | | if (processId!=null){ |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(processId) && processedProcessIds.contains(orderNumber)) { |
| | | continue; |
| | | } |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataDetails(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity())); |
| | | list.add(itemmap); |
| | | |
| | | // 检查是否已经处理过该 processId,如果处理过则跳过 |
| | | if (processedProcessIds.contains(processId) && processedProcessIds.contains(orderNumber)) { |
| | | continue; |
| | | } |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataDetails(flowCard.getProcessId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity())); |
| | | list.add(itemmap); |
| | | // 将该 processId 加入已处理集合 |
| | | processedProcessIds.add(processId); |
| | | processedProcessIds.add(orderNumber); |
| | | } else{ |
| | | |
| | | // 将该 processId 加入已处理集合 |
| | | processedProcessIds.add(processId); |
| | | processedProcessIds.add(orderNumber); |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintOrderDataDetails(flowCard.getOrderId(), flowCard.getOrderNumber(), flowCard.getPrintQuantity())); |
| | | list.add(itemmap); |
| | | } |
| | | |
| | | } |
| | | } else {//小片标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.TagStyle; |
| | | import com.example.erp.mapper.pp.FlowCardMapper; |
| | | import com.example.erp.mapper.pp.TagStyleMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | | public class TagStyleService { |
| | | private final TagStyleMapper tagStyleMapper; |
| | | |
| | | public TagStyleService(TagStyleMapper tagStyleMapper) { |
| | | final |
| | | FlowCardMapper flowCardMapper; |
| | | |
| | | public TagStyleService(TagStyleMapper tagStyleMapper, FlowCardMapper flowCardMapper) { |
| | | this.tagStyleMapper = tagStyleMapper; |
| | | this.flowCardMapper = flowCardMapper; |
| | | } |
| | | |
| | | public Boolean saveTag(TagStyle tagStyle) { |
| | |
| | | tagStyle.setId(null); |
| | | return tagStyleMapper.insert(tagStyle)>0; |
| | | } |
| | | |
| | | public Boolean updatePrintNumberSv(Map<String, Object> object) { |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | // 更新打印状态 |
| | | flowCardMapper.updatePrintNumberMp( flowCard.getProcessId(), flowCard.getOrderNumber()); |
| | | } |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | |
| | | where date(create_time)>=#{selectTime1} and date(create_time) <= #{selectTime2} |
| | | and position(#{orderId} in order_id) |
| | | and position(#{project} in project) |
| | | and processing_card >0 |
| | | and if(#{state}=0,(order_review >0 and processing_card =0),processing_card >0) |
| | | order by create_time desc |
| | | </select> |
| | | |
| | |
| | | fc.founder, |
| | | date(fc.splitFrame_time) as splitFrame_time, |
| | | /* if(fc.print_status=0,'未打印','已打印') as print_status*/ |
| | | fc.print_status, |
| | | ifnull(fc.print_number,0) as print_status, |
| | | ogd.process, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | od.order_number, |
| | |
| | | fc.founder, |
| | | date(fc.splitFrame_time) as splitFrame_time, |
| | | /* if(fc.print_status=0,'未打印','已打印') as print_status*/ |
| | | fc.print_status, |
| | | ifnull(fc.print_number,0) as print_status, |
| | | ogd.process, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | od.order_number, |
| | |
| | | </select> |
| | | |
| | | <select id="flowCardToOptimizeCount"> |
| | | select count(*) from pp.flow_card where order_id = #{orderId} and engineering_occupancy=1 |
| | | select count(*) from pp.flow_card where order_id = #{orderId} and project_no is not null |
| | | </select> |
| | | |
| | | <select id="getFlowCardDetail" > |
| | |
| | | FROM flow_card |
| | | WHERE process_id= #{processId} and project_no IS not NULL; |
| | | </select> |
| | | |
| | | <select id="selectPrintDetailsMp2"> |
| | | select ogd.id, |
| | | ogd.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | ogd.technology_number, |
| | | ogd.glass_address, |
| | | (od.quantity) as quantity, |
| | | (od.quantity) as printQuantity, |
| | | round((ogd.child_width * ogd.child_height * od.quantity / 1000000), 2) as total_area, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | | ogd.process, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | od.order_number, |
| | | ogd.child_width as width, |
| | | ogd.child_height as height |
| | | from sd.order_glass_detail as ogd |
| | | left join sd.order_detail as od on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | left join sd.`order` as o on o.order_id = ogd.order_id |
| | | where ogd.order_id = #{orderId} |
| | | GROUP BY od.order_number |
| | | order by od.order_number |
| | | </select> |
| | | |
| | | <select id="getPrintOrderDataDetails"> |
| | | select o.order_id as orderId, |
| | | project, |
| | | customer_id as customerId, |
| | | o.customer_name as customerName, |
| | | order_type as orderType, |
| | | order_classify as orderClassify, |
| | | batch, |
| | | o.icon, |
| | | pack_type as packType, |
| | | delivery_date as deliveryDate, |
| | | al_type as alType, |
| | | money, |
| | | contract_id as contractId, |
| | | customer_batch customerBatch, |
| | | contacts, |
| | | delivery_address as deliveryAddress, |
| | | od.processing_note as processingNote, |
| | | width, |
| | | height, |
| | | #{printQuantity} as quantity, |
| | | CONCAT( |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(width AS CHAR))), |
| | | ' X ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(height AS CHAR))), |
| | | ' = ',#{printQuantity} ) as size, |
| | | |
| | | CONCAT( |
| | | od.order_number,') ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(width AS CHAR))), |
| | | ' X ', |
| | | TRIM(TRAILING '.' FROM TRIM(TRAILING '0' FROM CAST(height AS CHAR))), |
| | | ' = ',#{printQuantity} ) as numberSize, |
| | | od.order_number as orderNumber, |
| | | ogd.technology_number as technologyNumber, |
| | | od.building_number as buildingNumber, |
| | | od.product_name as productName, |
| | | od.edging_type as edgingType, |
| | | od.remarks, |
| | | c.customer_abbreviation as customerAbbreviation, |
| | | p.product_abbreviation as productAbbreviation, |
| | | '' as processId, |
| | | o.create_time as createTime, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S01')) AS glassNumber, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S02')) AS figureNumber, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S03')) AS colourCeramicGlaze, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S04')) AS remarks1, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S05')) AS remarks2, |
| | | JSON_UNQUOTE(JSON_EXTRACT(od.other_columns, '$.S06')) AS remarks3, |
| | | 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.other_columns, |
| | | ogd.glass_child as glassChild, |
| | | ogd.glass_address as glassAddress, |
| | | JSON_UNQUOTE(JSON_EXTRACT(pd.separation, '$.color')) AS color, |
| | | '文本' as custom1, |
| | | '文本' as custom2, |
| | | '文本' as custom3, |
| | | '文本' as custom4, |
| | | '文本' as custom5, |
| | | od.quantity |
| | | from sd.order as o |
| | | left join sd.order_detail as od on o.order_id = od.order_id |
| | | left join sd.product as p on p.id = od.product_id |
| | | left join sd.customer as c on c.id = o.customer_id |
| | | left join sd.order_glass_detail as ogd |
| | | on ogd.order_id = od.order_id and ogd.order_number = od.order_number |
| | | left join sd.product_detail as pd on pd.prod_id = p.id and pd.sort_num = od.order_number and |
| | | pd.glass_sort = ogd.technology_number |
| | | |
| | | where od.order_id = #{orderId} |
| | | and od.order_number = #{orderNumber} |
| | | group by od.order_number, width, height |
| | | order by od.order_id |
| | | </select> |
| | | |
| | | <select id="updatePrintNumberMp"> |
| | | update pp.flow_card |
| | | set print_number = ifnull(print_number,0) + 1 |
| | | where process_id = #{processId} |
| | | and order_number = #{orderNumber} |
| | | </select> |
| | | </mapper> |
| | |
| | | and date(d.create_time) <= #{endDate} |
| | | and d.customer_id = #{orderDetail.order.customerId} |
| | | and om.money is not null |
| | | and om.money >0 |
| | | group by d.delivery_id, o.order_id, om.`column` |
| | | |
| | | UNION ALL |
| | |
| | | where date(o.create_time) >= #{startDate} |
| | | and date(o.create_time) <= #{endDate} |
| | | and o.customer_id = #{orderDetail.order.customerId} |
| | | and o.create_order>0 |
| | | and o.order_review>0 |
| | | group by od.order_id,od.product_id |
| | | |
| | | UNION ALL |
| | |
| | | where date(o.create_time) >= #{startDate} |
| | | and date(o.create_time) <= #{endDate} |
| | | and o.customer_id = #{orderDetail.order.customerId} |
| | | and o.order_review>0 |
| | | and om.money is not null |
| | | and om.money >0 |
| | | group by o.order_id, om.`column` |
| | | |
| | | </select> |
| | |
| | | <select id="exportOrderSummary" > |
| | | SELECT * |
| | | from sd.`order` as b |
| | | where date(b.create_time)>=#{dates[0]} and date(b.create_time) <= #{dates[1]} and b.create_order>0 |
| | | where date(b.create_time)>=#{dates[0]} and date(b.create_time) <= #{dates[1]} and b.order_review>0 |
| | | order by b.id desc |
| | | </select> |
| | | |
| | |
| | | on d.type_id = c.type_id |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | where date(a.create_time)>=#{dates[0]} and date(a.create_time) <= #{dates[1]} and b.create_order>0 |
| | | where date(a.create_time)>=#{dates[0]} and date(a.create_time) <= #{dates[1]} and b.order_review>0 |
| | | </select> |
| | | |
| | | |
| | |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | where date(b.create_time) >= #{dates[0]} |
| | | and date(b.create_time) <= #{dates[1]} and b.create_order>0 |
| | | and date(b.create_time) <= #{dates[1]} and b.order_review>0 |
| | | group by b.order_id, a.product_id |
| | | order by b.order_id desc |
| | | </select> |