Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | import PrintCustomLabel from '@/components/pp/PrintCustomLabelDetails.vue' |
| | | import PrintCustomLabelSemi from '@/components/pp/PrintCustomLabelSemi.vue' |
| | | import {Printer} from "@element-plus/icons-vue/global"; |
| | | import {View} from "@element-plus/icons-vue"; |
| | | |
| | | const { t } = useI18n() |
| | | const company = companyInfo() |
| | |
| | | |
| | | |
| | | const TgaStyleSet = ref([ |
| | | { |
| | | tid: 'INSIDE', title: '此面为室内面', data: '', type: 'text', |
| | | options: { |
| | | testData: '', |
| | | width:55, |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | | }, |
| | | { |
| | | tid: 'OUTSIDE', title: '此面为室外面', data: '', type: 'text', |
| | | options: { |
| | | testData: '', |
| | | width:55, |
| | | height: 16, |
| | | fontSize: 6.75, |
| | | textAlign: "left", |
| | | textContentVerticalAlign: "middle" |
| | | } |
| | | }, |
| | | { |
| | | tid: 'orderId', title: '订单号', data: '', type: 'text', |
| | | options: { |
| | |
| | | } |
| | | }, |
| | | |
| | | /*{ |
| | | tid: 'table', |
| | | field: 'table', |
| | | title: '自定义表格', |
| | | type: 'table', |
| | | //columns:[[null,null,null,null,null,null]], |
| | | "options": { |
| | | "left": 20, |
| | | "top": 20, |
| | | "height": 56, |
| | | "width": 555, |
| | | "field": "table", |
| | | "tableHeaderRepeat": "none", |
| | | "tableBorder": "noBorder", |
| | | "tableBodyRowBorder": "noBorder", |
| | | "tableBodyCellBorder": "noBorder", |
| | | "fields": [ |
| | | { |
| | | "text": "商品名称", |
| | | "field": "orderId" |
| | | }, |
| | | { |
| | | "text": "商品编码", |
| | | "field": "orderNumber" |
| | | } |
| | | ], |
| | | |
| | | }, |
| | | "columns": [ |
| | | [ |
| | | { |
| | | "width": 138.75, |
| | | "title": "商品名称", |
| | | "field": "orderId", |
| | | "checked": true, |
| | | "columnId": "orderId", |
| | | "fixed": false, |
| | | "rowspan": 1, |
| | | "colspan": 1, |
| | | "renderFormatter": "function(value,row,index,options){return `订单号:${row.orderId || '测试商品名'}<br>条码:${row.barcode || '123456'}`}" |
| | | }, |
| | | ] |
| | | ] |
| | | }*/ |
| | | |
| | | ]) |
| | | |
| | | const tags = ref([]) |
| | | const activeName = ref(null) |
| | | |
| | | |
| | | // 注册默认面板 |
| | | hiprint.init({ |
| | | providers: [new TagStyleSet(TgaStyleSet.value)] |
| | | }); |
| | | |
| | | |
| | | |
| | | // 必须在 dom 加载完成之后给刚刚绑定上的元素添加上拖拽事件 |
| | | onMounted(async () => { |
| | | let table = { |
| | | tid: 'table', |
| | | field: 'table', |
| | | title: '自定义表格', |
| | | type: 'table', |
| | | "options": { |
| | | "left": 20, |
| | | "top": 20, |
| | | "height": 56, |
| | | "width": 555, |
| | | "field": "table", |
| | | "tableHeaderRepeat": "none", |
| | | "tableBorder": "noBorder", |
| | | "tableBodyRowBorder": "noBorder", |
| | | "tableBodyCellBorder": "noBorder", |
| | | "gridColumnsGutter": 3, |
| | | "fields": [ |
| | | ], |
| | | |
| | | }, |
| | | columns:[[null,null,null,null,null,null]] |
| | | |
| | | } |
| | | let list = [] |
| | | TgaStyleSet.value.forEach(item => { |
| | | let para = { |
| | | text: item.title, |
| | | field: item.options.field |
| | | } |
| | | list.push(para) |
| | | }) |
| | | table.options.fields = list |
| | | TgaStyleSet.value.push(table) |
| | | await getTags() |
| | | |
| | | await hiprint.init({ |
| | | //host: 'http://10.153.19.26:17521', |
| | | providers: [new TagStyleSet(TgaStyleSet.value)] |
| | | }); |
| | | |
| | | |
| | | // 注册默认面板 |
| | | |
| | | await buildDesigner() |
| | | }) |
| | | |
| | |
| | | if(type==='list'){ |
| | | hiprintTemplate.value.setPaper(size.width, size.height) |
| | | }else{ |
| | | console.log(autoPaper.value.width, autoPaper.value.height) |
| | | if (autoPaper.value.width==null ||autoPaper.value.width=='' || autoPaper.value.height==null || autoPaper.value.height==''){ |
| | | ElMessage.warning("请输入完整宽高") |
| | | } |
| | |
| | | inputValue:tag.value.name |
| | | }).then(({ value }) => { |
| | | tag.value.name = value |
| | | tag.value.value = JSON.stringify(hiprintTemplate.value.getJson()) |
| | | let json = $ref(hiprintTemplate.value.getJson()) |
| | | if(json.panels[0].printElements[0].options.field==='table' && json.panels[0].printElements.length===1){ |
| | | let funct = "function(value,row,index,options){return `" |
| | | json.panels[0].printElements[0].options.columns[0].forEach(item => { |
| | | if(item.field){ |
| | | funct += item.title+':${row.'+item.field+' || "" } <br>' |
| | | } |
| | | }) |
| | | funct+='`}' |
| | | json.panels[0].printElements[0].options.columns[0][0].renderFormatter = funct |
| | | }else{ |
| | | ElMessage.warning('保存失败,请检查是否只有一个表格') |
| | | return |
| | | } |
| | | |
| | | |
| | | tag.value.value = JSON.stringify(json) |
| | | request.post('tagStyle/saveTag',tag.value).then(res => { |
| | | if(res.code === '200' && res.data===true){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | |
| | | const titleList = ref({}) |
| | | titleList.value=JSON.parse(JSON.stringify(hiprintTemplate.value.getJson())) |
| | | const printElements = titleList.value.panels[0].printElements; |
| | | const result = printElements.map(element => ({ |
| | | title: element.options.title, |
| | | name: element.options.field |
| | | })); |
| | | let a = [] |
| | | printElements.forEach(element => { |
| | | if(element.options.field==='table'){ |
| | | element.options.columns[0].forEach(elements => { |
| | | if(elements.field){ |
| | | a.push({ |
| | | title: elements.title, |
| | | name: elements.field |
| | | } |
| | | ) |
| | | } |
| | | }) |
| | | }else{ |
| | | a.push({ |
| | | title: element.options.title, |
| | | name: element.options.field |
| | | }) |
| | | } |
| | | }) |
| | | labelRow.value.titleList = a |
| | | |
| | | labelRow.value.titleList=result |
| | | labelRow.value.list =props.list |
| | | labelRow.value.faceOrientation = faceOrientation |
| | | labelRow.value.type = type |
| | |
| | | dialogTableVisibleCustomLabel.value = true |
| | | } |
| | | } |
| | | // request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/${lableType.value}`, data.value).then((res) => { |
| | | // if (res.code == 200) { |
| | | // produceList.value = deepClone(res.data.title) |
| | | // list.value = deepClone(res.data.data) |
| | | // const data = produceList.value[0].value |
| | | // dataList = JSON.parse(`[${data}]`); |
| | | // labelList = dataList[0] |
| | | // console.log(labelList.printElements) |
| | | // for (let i = 0; i < list.value.length; i++) { |
| | | // let count = list.value[i].data.length |
| | | // for (let j = 0; j < count; j++) { |
| | | // for (let k = 0; k < list.value[i].data[j].quantity; k++) { |
| | | // lastList.value.push(list.value[i].data[j]) |
| | | // } |
| | | // } |
| | | // } |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // router.push("/login") |
| | | // } |
| | | // hiprintTemplate.value.print(lastList.value) |
| | | // }) |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | const printOrder = () => { |
| | | const printOrder = (type) => { |
| | | const list = hiprintTemplate.value.getJson() |
| | | list.panels[0].printElements.forEach(element => { |
| | | element.options.fontFamily = 'Arial' |
| | | }) |
| | | hiprintTemplate.value.print(lastList.value) |
| | | let object = lastList.value |
| | | //判断是否为表格 |
| | | if(list.panels[0].printElements[0].options.field==='table'){ |
| | | object = {table:lastList.value} |
| | | } |
| | | |
| | | if(type===1){ |
| | | hiprintTemplate.value.print2(object) |
| | | }else{ |
| | | hiprintTemplate.value.print(object) |
| | | } |
| | | |
| | | } |
| | | |
| | | </script> |
| | |
| | | destroy-on-close |
| | | style="width: 80%;height:75% "> |
| | | <template #header="{ close, titleId, titleClass }"> |
| | | <el-button @click="printOrder" :icon="Printer" circle/> |
| | | <el-button @click="printOrder(1)" :icon="Printer" circle/> |
| | | <el-button @click="printOrder(2)" :icon="View" circle/> |
| | | </template> |
| | | <print-custom-label id="childLabel" |
| | | destroy-on-close |
| | |
| | | {field: 'thickness', title: t('processCard.glassThickness'), width: '80px'}, |
| | | {field: 'weight', title: t('processCard.weight'), slots: {default: 'weight_sum'}, width: '85px'}, |
| | | {field: 'remarks', title: t('processCard.notes'), width: '85px',filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod: filterChanged}, |
| | | {field: 'processing_note', title: t('order.processingNote'), width: '85px',filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod: filterChanged}, |
| | | {field: 'bend_radius', title: t('order.bendRadius'), width: '120px',filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod: filterChanged,sortable: true,} |
| | | |
| | | ],//表头按钮 |
| | |
| | | .row3 { |
| | | margin-top: -5px; |
| | | height: 30px; |
| | | font-size: 20pt; |
| | | font-size: 22pt; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | |
| | | margin-left: 40px; |
| | | } |
| | | .row1 span{ |
| | | font-size: 15pt; |
| | | font-size: 17pt; |
| | | } |
| | | |
| | | .row2 span{ |
| | | font-size: 15pt; |
| | | font-size: 17pt; |
| | | } |
| | | |
| | | .row5 span{ |
| | | font-size: 15pt; |
| | | font-size: 17pt; |
| | | } |
| | | |
| | | .row6 { |
| | |
| | | height: 35px; |
| | | } |
| | | .row1 span { |
| | | font-size: 15pt; |
| | | font-size: 17pt; |
| | | } |
| | | |
| | | .row2 { |
| | |
| | | height: 35px; |
| | | } |
| | | .row2 span { |
| | | font-size: 14pt; |
| | | font-size: 16pt; |
| | | } |
| | | span { |
| | | font-size: 12pt; |
| | |
| | | .row3 { |
| | | margin-top: -5px; |
| | | height: 35px; |
| | | font-size: 22pt; |
| | | font-size: 24pt; |
| | | font-weight: bolder; |
| | | line-height: 35px; |
| | | } |
| | |
| | | margin-left: 20px; |
| | | } |
| | | .row5 span { |
| | | font-size: 14pt; |
| | | font-size: 16pt; |
| | | } |
| | | |
| | | .row6 { |
| | |
| | | height: 35px; |
| | | } |
| | | .row1 span { |
| | | font-size: 15pt; |
| | | font-size: 17pt; |
| | | } |
| | | .row2 { |
| | | font-size: 12pt; |
| | |
| | | height: 35px; |
| | | } |
| | | .row2 span { |
| | | font-size: 14pt; |
| | | font-size: 17pt; |
| | | } |
| | | span { |
| | | font-size: 12pt; |
| | |
| | | line-height: 35px; |
| | | } |
| | | .row3 span{ |
| | | font-size: 22pt; |
| | | font-size: 24pt; |
| | | } |
| | | |
| | | .row5 { |
| | |
| | | font-size: 14pt; |
| | | } |
| | | .row5 span { |
| | | font-size: 14pt; |
| | | font-size: 16pt; |
| | | } |
| | | |
| | | .row6 { |
| | |
| | | } |
| | | }) |
| | | }else{ |
| | | console.log(printType) |
| | | if (printType == 1) { |
| | | data.value.printList = JSON.parse(route.query.printList) |
| | | request.post(`/processCard/getSelectPrintLabel1`,data.value).then((res) => { |
| | |
| | | height: 20px; |
| | | } |
| | | .row1 span { |
| | | font-size: 10pt; |
| | | font-size: 12pt; |
| | | font-weight: bold; |
| | | } |
| | | |
| | |
| | | .row3 { |
| | | margin-top: -5px; |
| | | height: 25px; |
| | | font-size: 15pt; |
| | | font-size: 17pt; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | |
| | | font-size: 8pt; |
| | | } |
| | | .row5 span { |
| | | font-size: 10pt; |
| | | font-size: 12pt; |
| | | font-weight: bold; |
| | | } |
| | | |
| | |
| | | font-size: 8pt; |
| | | } |
| | | .row6 span { |
| | | font-size: 10pt; |
| | | font-size: 12pt; |
| | | font-weight: bold; |
| | | } |
| | | .cell{ |
| | |
| | | height: 20px; |
| | | } |
| | | .row1 span { |
| | | font-size: 10pt; |
| | | font-size: 12pt; |
| | | } |
| | | |
| | | .row2 { |
| | |
| | | height: 20px; |
| | | } |
| | | .row2 span { |
| | | font-size: 10pt; |
| | | font-size: 12pt; |
| | | } |
| | | span { |
| | | font-size: 10pt; |
| | |
| | | .row3 { |
| | | margin-top: -5px; |
| | | height: 28px; |
| | | font-size: 15pt; |
| | | font-size: 17pt; |
| | | font-weight: bolder; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .row5 span { |
| | | font-size: 8pt; |
| | | font-size: 10pt; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import {ElDatePicker, ElMessage, ElMessageBox} from "element-plus" |
| | | import useProductGlassTypeStore from "@/stores/sd/product/productGlassType" |
| | | import footSum from "@/hook/footSum" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | |
| | | flowCard: selectRecords |
| | | |
| | | }) |
| | | request.post("/processCard/mergeFlowCard", flowData.value).then((res) => { |
| | | if(res.code==200 && res.data==="true"){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path: '/main/processCard/SelectProcessCard', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | | router.push("/login") |
| | | ElMessageBox.confirm( |
| | | "是否合并?", |
| | | { |
| | | confirmButtonText: t('basicData.confirmButtonText'), |
| | | cancelButtonText: t('basicData.cancelButtonText'), |
| | | distinguishCancelAndClose: true, |
| | | type: 'warning', |
| | | } |
| | | ).then(()=>{ |
| | | request.post("/processCard/mergeFlowCard", flowData.value).then((res) => { |
| | | if(res.code==200 && res.data==="true"){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path: '/main/processCard/SelectProcessCard', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | | router.push("/login") |
| | | }) |
| | | |
| | | }) |
| | | break |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | gridOptions.editRules[`otherColumns.${item.column}`] = [ |
| | | { |
| | | validator ({ cellValue }) { |
| | | const regex = /^(0(\.\d{1,2})?|([1-9]\d{0,4})(\.\d{1,2})?|99999(\.9{1,2})?)$/ |
| | | const regex = /^(0(\.\d{1,3})?|([1-9]\d{0,4})(\.\d{1,3})?|99999(\.9{1,3})?)$/ |
| | | if (cellValue && !regex.test(cellValue)) { |
| | | return new Error(t('basicData.msg.range99999Dec2')) |
| | | return new Error(t('basicData.msg.range99999Dec3')) |
| | | } |
| | | } |
| | | } |
| | |
| | | private Double area; |
| | | @ExcelProperty("其他金额") |
| | | private Double otherMoney; |
| | | @ExcelProperty("运费金额") |
| | | private Double freight; |
| | | @ExcelProperty("运费单价") |
| | | private Double freightPrice; |
| | | @ExcelProperty("运费数量") |
| | | private Double freightQuantity; |
| | | @ExcelProperty("金额") |
| | | private Double money; |
| | | @ExcelProperty("客户编号") |
| | |
| | | private Double area; |
| | | @ExcelProperty("其他金额") |
| | | private Double otherMoney; |
| | | @ExcelProperty("运费金额") |
| | | private Double freight; |
| | | @ExcelProperty("运费单价") |
| | | private Double freightPrice; |
| | | @ExcelProperty("运费数量") |
| | | private Double freightQuantity; |
| | | @ExcelProperty("金额") |
| | | private Double money; |
| | | @ExcelProperty("客户编号") |
| | |
| | | |
| | | List<Map<String, Object>> selectFlowCardMerge(String processId); |
| | | |
| | | Boolean updateFlowCardMerge(String processId); |
| | | Boolean updateFlowCardMerge(String processId,List<Integer> technologyNumbers,Integer index); |
| | | |
| | | Boolean deleteflowCardSort(String orderId, String processId); |
| | | |
| | |
| | | Integer selectOrderIdYear(String oldOrderId); |
| | | |
| | | Boolean updateOrderId(String oldOrderId,String newOrderId); |
| | | |
| | | Order selectOrderId(String orderId); |
| | | } |
| | |
| | | |
| | | import java.sql.Date; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.example.erp.service.sd.OrderService.getOrderProcessDetails; |
| | | |
| | |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | List<Map<String, Object>> flowCardList1=flowCardMapper.selectFlowCardMerge(flowCardList.get(0).getProcessId()); |
| | | if(flowCardList1.size()==1){ |
| | | flowCardMapper.updateFlowCardMerge(flowCardList.get(0).getProcessId()); |
| | | returns="true"; |
| | | int index=1; |
| | | for(int i = 0;i < flowCardList1.size();i++){ |
| | | if(Integer.valueOf(flowCardList1.get(i).get("count2").toString())>1){ |
| | | List<Integer> technologyNumber = Arrays.stream(flowCardList1.get(i).get("count1").toString().split(",")) |
| | | .map(Integer::parseInt) |
| | | .collect(Collectors.toList()); |
| | | flowCardMapper.updateFlowCardMerge(flowCardList.get(0).getProcessId(),technologyNumber,index); |
| | | index+=1; |
| | | returns="true"; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | return returns; |
| | |
| | | log.setContent(orderMap.toString()); |
| | | log.setFunction("saveOrderTitle保存表头:"+order.getOrderId()); |
| | | |
| | | Order order1 = orderMapper.selectOrderId(order.getOrderId()); |
| | | order.setCalculateType(order1.getCalculateType()); |
| | | |
| | | LambdaUpdateWrapper<Order> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.eq(Order::getOrderId, order.getOrderId()); |
| | | order.setCreateTime(null); |
| | |
| | | orderOtherMoney.setOrderId(orderId); |
| | | if(orderOtherMoney.getQuantity()!=null && orderOtherMoney.getPrice()!=null){ |
| | | orderOtherMoney.setMoney((orderOtherMoney.getQuantity()*orderOtherMoney.getPrice())); |
| | | }else { |
| | | orderOtherMoney.setMoney(0.0); |
| | | } |
| | | orderOtherMoneyMapper.insert(orderOtherMoney); |
| | | }); |
| | |
| | | Order order = JSONObject.parseObject(JSONObject.toJSONString(jsonObject.get("order")), Order.class); |
| | | List<OrderDetail> OrderDetails = JSONArray.parseArray(JSONObject.toJSONString(jsonObject.get("detail")), OrderDetail.class); |
| | | List<OrderOtherMoney> orderOtherMoneyList = JSONArray.parseArray(JSONObject.toJSONString(jsonObject.get("otherMoney")), OrderOtherMoney.class); |
| | | double money = 0; |
| | | for (OrderDetail orderDetail : OrderDetails) { |
| | | orderDetail = updateOrderMoneyComputed(orderDetail,order.getCalculateType()); |
| | | BigDecimal getGrossAmount= BigDecimal.valueOf(orderDetail.getGrossAmount()); |
| | | money+=getGrossAmount.doubleValue(); |
| | | |
| | | if(orderOtherMoneyList != null ){ |
| | | orderOtherMoneyList = orderOtherMoneyList.stream().filter(o -> o.getColumn().indexOf("M")==0).collect(Collectors.toList()); |
| | | } |
| | | if(orderOtherMoneyList!=null){ |
| | | orderOtherMoneyList.forEach(orderOtherMoney -> { |
| | | orderOtherMoney.setQuantity(0.0); |
| | | }); |
| | | } |
| | | |
| | | Log log = new Log(); |
| | | log.setOperator(order.getCreator()); |
| | | log.setOperatorId(order.getCreatorId()); |
| | | log.setContent(jsonObject.toString()); |
| | | log.setFunction("updateOrderMoney金额重置:"+order.getOrderId()); |
| | | |
| | | orderOtherMoneyList.forEach(orderOtherMoney -> { |
| | | if(orderOtherMoney.getQuantity()!=null && orderOtherMoney.getPrice()!=null){ |
| | | orderOtherMoney.setMoney((orderOtherMoney.getQuantity()*orderOtherMoney.getPrice())); |
| | | //删除其他金额明细表 |
| | | orderOtherMoneyMapper.delete(new LambdaQueryWrapper<OrderOtherMoney>().eq(OrderOtherMoney::getOrderId, order.getOrderId())); |
| | | List<OrderOtherMoney> orderOtherMoneyLists=orderOtherMoneyList; |
| | | |
| | | double money = 0; |
| | | for (OrderDetail orderDetail : OrderDetails) { |
| | | orderDetail = updateOrderMoneyComputed(orderDetail,order.getCalculateType()); |
| | | BigDecimal getGrossAmount= BigDecimal.valueOf(orderDetail.getGrossAmount()); |
| | | money+=getGrossAmount.doubleValue(); |
| | | |
| | | Map<String,Object> otherColumns = JSON.parseObject(orderDetail.getOtherColumns(), new TypeReference<Map<String, Object>>(){}); |
| | | if(otherColumns!=null){ |
| | | otherColumns.values().removeIf(value -> value == null || value.equals("")); |
| | | orderDetail.setOtherColumns(JSON.toJSONString(otherColumns)); |
| | | |
| | | OrderDetail finalOrderDetail = orderDetail; |
| | | otherColumns.forEach((key, value) ->{ |
| | | |
| | | if(value!=null && !value.equals("") && key.contains("M")) { |
| | | orderOtherMoneyLists.forEach(orderOtherMoney -> { |
| | | if (orderOtherMoney.getColumn().equals(key)) { |
| | | orderOtherMoney.setQuantity( |
| | | orderOtherMoney.getQuantity()+(Double.parseDouble((String) value) * finalOrderDetail.getQuantity())); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | }); |
| | | }else{ |
| | | orderDetail.setOtherColumns("{}"); |
| | | } |
| | | orderOtherMoneyMapper.update(orderOtherMoney,new QueryWrapper<OrderOtherMoney>() |
| | | .eq("order_id",orderOtherMoney.getOrderId()) |
| | | .eq("`column`",orderOtherMoney.getColumn())); |
| | | }); |
| | | |
| | | } |
| | | |
| | | if(orderOtherMoneyLists!=null){ |
| | | orderOtherMoneyLists.forEach(orderOtherMoney ->{ |
| | | orderOtherMoney.setId(null); |
| | | orderOtherMoney.setOrderId(order.getOrderId()); |
| | | if(orderOtherMoney.getQuantity()!=null && orderOtherMoney.getPrice()!=null){ |
| | | orderOtherMoney.setMoney((orderOtherMoney.getQuantity()*orderOtherMoney.getPrice())); |
| | | }else { |
| | | orderOtherMoney.setMoney(0.0); |
| | | } |
| | | orderOtherMoneyMapper.insert(orderOtherMoney); |
| | | }); |
| | | } |
| | | |
| | | order.setMoney(money+orderOtherMoneyMapper.selectGrossAmount(order.getOrderId())); |
| | | order.setOtherMoney(orderOtherMoneyMapper.selectGrossAmount(order.getOrderId())); |
| | | orderMapper.updateMoney(order); |
| | |
| | | ifnull(p.thickness,'') as thickness, |
| | | od.weight, |
| | | od.remarks, |
| | | od.processing_note, |
| | | ifnull(od.bend_radius,'') as bend_radius, |
| | | ods.S01, |
| | | ods.S02, |
| | |
| | | od.other_columns, |
| | | od.bend_radius, |
| | | od.order_number as heat_layout_id, |
| | | ogd.technology_number as heat_layout_sort |
| | | a.id as heat_layout_sort |
| | | from pp.optimize_detail opd |
| | | left join sd.`order` o on SUBSTR(opd.process_id, 1, 10) = o.order_id |
| | | left join sd.order_detail od |
| | |
| | | left join sd.product p on od.product_id = p.id |
| | | left join sd.basic_glass_type e on e.type_id = p.type_id |
| | | left join sd.customer c on c.id = o.customer_id |
| | | left join |
| | | (select (@row_number := @row_number + 1) as id,process_id as process_id from (select process_id from pp.optimize_detail tt where project_no =#{projectNo} group by process_id) tt,(select @row_number := 0) as t) a |
| | | on a.process_id=opd.process_id |
| | | where opd.project_no = #{projectNo} |
| | | order by opd.stock_id |
| | | </select> |
| | |
| | | </select> |
| | | |
| | | <select id="selectFlowCardMerge"> |
| | | select * |
| | | select *,GROUP_CONCAT(DISTINCT fc.technology_number) as count1,count(DISTINCT fc.technology_number) as count2 |
| | | from pp.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 |
| | |
| | | </select> |
| | | |
| | | <update id="updateFlowCardMerge"> |
| | | update pp.flow_card fc set fc.merge=1 |
| | | where fc.process_id = #{processId} |
| | | update pp.flow_card fc set fc.merge=#{index} |
| | | where fc.process_id = #{processId} and fc.technology_number in |
| | | <foreach item="technologyNumber" collection="technologyNumbers" open="(" separator="," close=")"> |
| | | #{technologyNumber} |
| | | </foreach> |
| | | </update> |
| | | |
| | | <delete id="deleteflowCardSort"> |
| | |
| | | and d.customer_id = #{orderDetail.order.customerId} |
| | | and om.money is not null |
| | | group by d.delivery_id, o.order_id, om.`column` |
| | | |
| | | UNION ALL |
| | | |
| | | select d.delivery_id, |
| | | d.order_id, |
| | | d.customer_name, |
| | | d.project, |
| | | '运费' as product_name, |
| | | d.freight_quantity as quantity, |
| | | 0 as area, |
| | | d.freight_price as price, |
| | | d.freight as money, |
| | | date(d.create_time) as create_time |
| | | |
| | | from sd.delivery d |
| | | |
| | | where date(d.create_time) >= #{startDate} |
| | | and date(d.create_time) <= #{endDate} |
| | | and d.customer_id = #{orderDetail.order.customerId} |
| | | and d.freight >0 |
| | | group by d.delivery_id |
| | | </select> |
| | | |
| | | <select id="exportSelectCustomerOderDate" > |
| | |
| | | dd.quantity, |
| | | dd.delivery_detail_remakes, |
| | | dd.create_time, |
| | | o.other_money |
| | | o.other_money, |
| | | d.freight, |
| | | d.freight_price, |
| | | d.freight_quantity |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | |
| | | dd.delivery_detail_remakes, |
| | | dd.price, |
| | | dd.create_time, |
| | | o.other_money |
| | | o.other_money, |
| | | d.freight, |
| | | d.freight_price, |
| | | d.freight_quantity |
| | | from sd.delivery_detail dd left join delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | left join sd.`order` o on dd.order_id=o.order_id |
| | |
| | | update order_detail as a |
| | | set |
| | | a.price = #{item.price}, |
| | | a.gross_amount = #{item.grossAmount} |
| | | a.gross_amount = #{item.grossAmount}, |
| | | a.other_columns = #{item.otherColumns} |
| | | where |
| | | a.order_id = #{item.orderId} and |
| | | a.order_number = #{item.orderNumber} |
| | |
| | | select count(*) from sd.`order` where order_id=#{oldOrderId} and SUBSTR(#{oldOrderId},5,2)=000001 |
| | | </select> |
| | | |
| | | |
| | | <select id="selectOrderId"> |
| | | select * from sd.`order` where order_id=#{orderId} |
| | | </select> |
| | | |
| | | <update id="updateOrderId"> |
| | | update sd.`order` set order_id=#{newOrderId} where order_id=#{oldOrderId} |