Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
| New file |
| | |
| | | <!-- ImageSizeEditor.vue --> |
| | | <template> |
| | | <div class="img-grid"> |
| | | <div |
| | | v-for="(img, index) in images" |
| | | :key="getKey(img, index)" |
| | | class="img-box" |
| | | :style="getImgBoxStyle(getKey(img, index))" |
| | | @click="openSizeDialog(img, index)" |
| | | > |
| | | <el-image |
| | | :src="img.imageBase64" |
| | | :fit="fit" |
| | | style="width: 100%; height: 100%; display: block;" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | :title="dialogTitle" |
| | | width="460px" |
| | | append-to-body |
| | | > |
| | | <div class="form-row"> |
| | | <el-input-number |
| | | v-model="form.w" |
| | | :min="minWidth" |
| | | :max="maxWidth" |
| | | controls-position="right" |
| | | /> |
| | | <span class="mul">×</span> |
| | | <el-input-number |
| | | v-model="form.h" |
| | | :min="minHeight" |
| | | :max="maxHeight" |
| | | controls-position="right" |
| | | /> |
| | | </div> |
| | | |
| | | <div class="ops-row"> |
| | | <!-- <el-switch v-model="applyToAll" active-text="应用到全部图片" />--> |
| | | <div v-if="showHint" class="hint"> |
| | | 当前:{{ form.w }} × {{ form.h }} px |
| | | </div> |
| | | </div> |
| | | |
| | | <template #footer> |
| | | <el-button @click="dialogVisible = false">取消</el-button> |
| | | |
| | | <!-- ✅ 一键全图统一尺寸:不关弹窗,立即应用 --> |
| | | <el-button @click="applyAllNow" :disabled="!canApply"> |
| | | 尺寸相同 |
| | | </el-button> |
| | | |
| | | <!-- ✅ 确定:如果开关打开,则同样会应用全部,否则只应用当前 --> |
| | | <el-button type="primary" @click="confirmSize" :disabled="!canApply"> |
| | | 确定 |
| | | </el-button> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { computed, reactive, ref, unref } from 'vue' |
| | | |
| | | const props = defineProps({ |
| | | images: { type: Array, default: () => [] }, |
| | | keyField: { type: String, default: 'orderNumber' }, // 你数据 id=null,推荐 orderNumber |
| | | srcField: { type: String, default: 'imageBase64' }, |
| | | |
| | | sizeMap: { type: Object, default: () => ({}) }, |
| | | |
| | | defaultWidth: { type: Number, default: 600 }, |
| | | defaultHeight: { type: Number, default: 400 }, |
| | | |
| | | minWidth: { type: Number, default: 50 }, |
| | | maxWidth: { type: Number, default: 3000 }, |
| | | minHeight: { type: Number, default: 50 }, |
| | | maxHeight: { type: Number, default: 3000 }, |
| | | |
| | | fit: { type: String, default: 'contain' }, |
| | | marginX: { type: String, default: '30px' }, |
| | | dialogTitle: { type: String, default: '设置图片尺寸' }, |
| | | showHint: { type: Boolean, default: true } |
| | | }) |
| | | |
| | | const emit = defineEmits(['update:sizeMap', 'change', 'changeAll']) |
| | | |
| | | const sizeStore = computed({ |
| | | get: () => props.sizeMap || {}, |
| | | set: (val) => emit('update:sizeMap', val) |
| | | }) |
| | | |
| | | const dialogVisible = ref(false) |
| | | const activeKey = ref(null) |
| | | |
| | | const form = reactive({ |
| | | w: props.defaultWidth, |
| | | h: props.defaultHeight |
| | | }) |
| | | |
| | | const applyToAll = ref(false) |
| | | |
| | | const canApply = computed(() => { |
| | | const w = Number(form.w) |
| | | const h = Number(form.h) |
| | | return w > 0 && h > 0 |
| | | }) |
| | | |
| | | const getKey = (img, index) => { |
| | | const k = img?.[props.keyField] |
| | | return (k !== undefined && k !== null && k !== '') ? String(k) : String(index) |
| | | } |
| | | |
| | | const getSrc = (img) => img?.[props.srcField] |
| | | |
| | | const getSize = (key) => { |
| | | const s = unref(sizeStore.value?.[key]) |
| | | if (s && s.w && s.h) return { w: Number(s.w), h: Number(s.h) } |
| | | return { w: props.defaultWidth, h: props.defaultHeight } |
| | | } |
| | | |
| | | const getImgBoxStyle = (key) => { |
| | | const { w, h } = getSize(key) |
| | | return { |
| | | width: `${w}px`, |
| | | height: `${h}px`, |
| | | marginLeft: props.marginX, |
| | | marginRight: props.marginX |
| | | } |
| | | } |
| | | |
| | | |
| | | const openSizeDialog = (img, index) => { |
| | | const key = getKey(img, index) |
| | | activeKey.value = key |
| | | |
| | | const cur = getSize(key) |
| | | form.w = cur.w |
| | | form.h = cur.h |
| | | |
| | | applyToAll.value = false |
| | | dialogVisible.value = true |
| | | } |
| | | |
| | | // ✅ 应用到当前一张 |
| | | const applyOne = (key, w, h) => { |
| | | sizeStore.value = { ...sizeStore.value, [key]: { w, h } } |
| | | emit('change', key, { w, h }) |
| | | } |
| | | |
| | | // ✅ 一键应用到全部 |
| | | const applyAll = (w, h) => { |
| | | const next = { ...sizeStore.value } |
| | | props.images.forEach((img, idx) => { |
| | | const k = getKey(img, idx) |
| | | next[k] = { w, h } |
| | | }) |
| | | sizeStore.value = next |
| | | emit('changeAll', { w, h }) |
| | | } |
| | | |
| | | // ✅ footer 按钮:立即统一全图尺寸(不关弹窗) |
| | | const applyAllNow = () => { |
| | | if (!canApply.value) return |
| | | const w = Number(form.w) |
| | | const h = Number(form.h) |
| | | applyAll(w, h) |
| | | } |
| | | |
| | | // ✅ 确定:如果开关打开 => 全部;否则只改当前 |
| | | const confirmSize = () => { |
| | | if (!canApply.value) return |
| | | const w = Number(form.w) |
| | | const h = Number(form.h) |
| | | |
| | | if (applyToAll.value) { |
| | | applyAll(w, h) |
| | | dialogVisible.value = false |
| | | return |
| | | } |
| | | |
| | | const key = activeKey.value |
| | | if (key === null || key === undefined) return |
| | | applyOne(key, w, h) |
| | | dialogVisible.value = false |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .img-grid { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | gap: 12px; |
| | | } |
| | | |
| | | .form-row { |
| | | display: flex; |
| | | gap: 12px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .mul { |
| | | line-height: 32px; |
| | | } |
| | | |
| | | .ops-row{ |
| | | margin-top: 12px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | gap: 12px; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .hint { |
| | | font-size: 12px; |
| | | opacity: 0.75; |
| | | } |
| | | </style> |
| | |
| | | import companyInfo from "@/stores/sd/companyInfo"; |
| | | import userInfo from "@/stores/userInfo" |
| | | import {add} from '@/utils/decimal' |
| | | import ImageSizeEditor from '@/components/ImageSizeEditor.vue' |
| | | //语言获取 |
| | | const company = companyInfo() |
| | | const {t} = useI18n() |
| | |
| | | let list = ref() |
| | | const details = ref([]) |
| | | const user=userInfo() |
| | | const imgSizeMap = ref({}) |
| | | |
| | | let totalQuantity = 0; // 用于记录总数量 |
| | | let totalArea = 0; // 用于记录总面积 |
| | |
| | | <!-- <el-button id="printButton" @click="printFlowCard();">{{ $t('basicData.print') }}</el-button>--> |
| | | <div id="printFlowCard"> |
| | | <div id="contentDiv" v-for="(item,id) in produceList" :key="id"> |
| | | <table id="contentTable" style="border-bottom: none"> |
| | | <table id="contentTable" style="border-bottom: none;margin-bottom: 20px"> |
| | | <thead> |
| | | <tr v-for="(itemFlow,index) in item.detail" :key="index"> |
| | | <td colspan="31"> |
| | |
| | | </tr> |
| | | </tfoot> |
| | | </table> |
| | | <el-image |
| | | v-for="(img, index) in getPicturesByDetailList(item.detailList)" |
| | | :key="index" |
| | | :src="img.imageBase64" |
| | | fit="contain" |
| | | style="max-width: 100%;" |
| | | <!-- <el-image--> |
| | | <!-- v-for="(img, index) in getPicturesByDetailList(item.detailList)"--> |
| | | <!-- :key="index"--> |
| | | <!-- :src="img.imageBase64"--> |
| | | <!-- fit="contain"--> |
| | | <!-- style="max-width: 100%;margin: 50px"--> |
| | | <!-- />--> |
| | | <ImageSizeEditor |
| | | :images="getPicturesByDetailList(item.detailList)" |
| | | v-model:sizeMap="imgSizeMap" |
| | | key-field="orderNumber" |
| | | src-field="imageBase64" |
| | | :default-width="300" |
| | | :default-height="300" |
| | | /> |
| | | </div> |
| | | </div> |
| | |
| | | import {ElMessage} from "element-plus"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {Bottom, Burger, Food} from "@element-plus/icons-vue"; |
| | | import ImageSizeEditor from '@/components/ImageSizeEditor.vue' |
| | | const company = companyInfo() |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | let dialogVisible = ref(false) |
| | | |
| | | |
| | | const imgSizeMap = ref({}) |
| | | let props = defineProps({ |
| | | orderId:null, |
| | | dataList:null, |
| | | }) |
| | | let productId=ref({ |
| | | |
| | |
| | | perimeter: 0, |
| | | weight:0 |
| | | }) |
| | | const picture = ref([]) |
| | | const dataFile = ref({ |
| | | printList: [] |
| | | }) |
| | | dataFile.value.printList = JSON.parse(props.dataList) |
| | | |
| | | const getData = () => { |
| | | request.get(`/order/printOrderProductDetail/${props.orderId}/${selectedValues.value}`).then(res => { |
| | | data.value= res.data |
| | |
| | | grossNum.value.perimeter = parseFloat(grossNum.value.perimeter.toFixed(3)) |
| | | grossNum.value.weight = parseFloat(grossNum.value.weight.toFixed(2)) |
| | | |
| | | }) |
| | | |
| | | //订单序号dwg图片查询 |
| | | request.post("/orderFile/getOrderFilePicture", dataFile.value.printList).then((res) => { |
| | | picture.value = res.data |
| | | }) |
| | | } |
| | | |
| | |
| | | defineExpose({ |
| | | printSheet |
| | | }); |
| | | |
| | | // 原始图片数组 picture |
| | | const pictureMap = computed(() => { |
| | | return picture.value |
| | | }) |
| | | |
| | | |
| | | </script> |
| | | |
| | | |
| | |
| | | <td style="font-size: 20px;font-weight: bold;">{{items.quantity}}</td> |
| | | <td style="font-size: 20px;font-weight: bold;">{{items.perimeter}}</td> |
| | | <td style="font-size: 20px;font-weight: bold;">{{items.grossArea.toFixed(2)}}</td> |
| | | <td colspan="2">{{items.processingNote}} |
| | | <td colspan="2" style="text-align: left;border:none;font-weight: bold;font-size: 17px;">{{items.processingNote}} |
| | | {{items.remarks==null?'':'/'}} |
| | | {{items.remarks}}</td> |
| | | </tr> |
| | |
| | | </el-option> |
| | | </el-select> |
| | | </el-dialog> |
| | | |
| | | <ImageSizeEditor |
| | | :images="pictureMap" |
| | | v-model:sizeMap="imgSizeMap" |
| | | key-field="orderNumber" |
| | | src-field="imageBase64" |
| | | :default-width="300" |
| | | :default-height="300" |
| | | /> |
| | | </div> |
| | | |
| | | |
| | |
| | | qualityInspectionDate:ref(["",""]), |
| | | brokenDate:ref(["",""]), |
| | | yieldDate:ref(["",""]), |
| | | replenishDate:ref(["",""]), |
| | | searchOrderListFilter:ref([]),//订单首页筛选] |
| | | searchOrderFilter:{ |
| | | list:ref([]), |
| | |
| | | this.qualityInspectionDate=["",""] |
| | | this.brokenDate=["",""] |
| | | this.yieldDate=["",""] |
| | | this.replenishDate=["",""] |
| | | this.searchOrderFilter={ |
| | | list:[], |
| | | data:{} |
| | |
| | | printRow.value.flashback = flashback.value |
| | | printRow.value.landingSequence=landingSequence.value |
| | | printRow.value.compound = compound.value |
| | | console.log(printRow.value) |
| | | // router.push({path: '/main/processCard/printProcess', query: {printList: JSON.stringify(selectRecords),printMerge:printMergeVal}}) |
| | | if(company.companyName=='常州市吉利玻璃有限公司'){ |
| | | dialogTableVisibleStraight.value = true |
| | |
| | | {field: 'process_id',width: 150, title: t('processCard.processId'),filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'technology_number', width: 110,title: t('processCard.technologyNumber'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | {field: 'print_status', width: 120,title: t('processCard.numberTimesProcessCardPrinted')}, |
| | | {field: 'print_number', width: 110,title: t('processCard.numberLabelPrintingOperations')}, |
| | | {field: 'order_number', width: 100,title: t('order.OrderNum'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | |
| | | // {field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | // slots: {filter: 'num1_filter'}, |
| | | // filterMethod: filterChanged}, |
| | | {field: 'technology_number', width: 110,title: t('processCard.technologyNumber'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged}, |
| | | |
| | | {field: 'quantity', width: 90,title: t('order.quantity')}, |
| | | {field: 'grossArea', width: 90,title: t('order.area')}, |
| | | {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')}, |
| | |
| | | import PrintCustomLabelProject from "@/components/pp/PrintCustomLabelProject.vue"; |
| | | import PrintProcessConsolidated from '@/components/pp/PrintConsolidatedReplenish.vue' |
| | | import {createTemplate} from "@/hook/createTemplateTag"; |
| | | import useOrderInfoStore from "@/stores/sd/order/orderInfo"; |
| | | const company = companyInfo() |
| | | const orderInfo = useOrderInfoStore() |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | // 第一次加载查询 |
| | | request.post(`/Replenish/selectPrint/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | request.post(`/Replenish/selectPrint/${orderInfo.replenishDate}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.dataType = res.data.type |
| | | orderInfo.replenishDate = res.data.selectDate |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | let endTime = form.date1[1] |
| | | gridOptions.loading=true |
| | | // 第一次加载查询 |
| | | request.post(`/Replenish/selectPrint/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | request.post(`/Replenish/selectPrint/${orderInfo.replenishDate}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | |
| | | xGrid.value.loadData(res.data.data) |
| | | orderInfo.replenishDate = res.data.selectDate |
| | | titleSelectJson.value.dataType = res.data.type |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="head"> |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | v-model="orderInfo.replenishDate" |
| | | :default-time="defaultTime" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | format="YYYY/MM/DD" |
| | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import footSum from "@/hook/footSum"; |
| | | import useOrderInfoStore from "@/stores/sd/order/orderInfo"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | |
| | | |
| | | const orderInfo = useOrderInfoStore() |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | |
| | | }) |
| | | |
| | | //第一次调用 |
| | | request.post(`/Replenish/SelectReplenish/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | request.post(`/Replenish/SelectReplenish/1/${total.pageSize}/${orderInfo.replenishDate}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | selectDate.value = res.data.selectDate |
| | | orderInfo.replenishDate = res.data.selectDate |
| | | pageNum.value=1 |
| | | |
| | | produceList = deepClone(res.data.data) |
| | |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | request.post(`/Replenish/SelectReplenish/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | request.post(`/Replenish/SelectReplenish/1/${total.pageSize}/${orderInfo.replenishDate}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | selectDate.value = res.data.selectDate |
| | | orderInfo.replenishDate = res.data.selectDate |
| | | pageNum.value=1 |
| | | |
| | | produceList = deepClone(res.data.data) |
| | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | gridOptions.loading = true |
| | | request.post(`/Replenish/SelectReplenish/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | request.post(`/Replenish/SelectReplenish/${pageNum.value}/${total.pageSize}/${orderInfo.replenishDate}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | selectDate.value = res.data.selectDate |
| | | orderInfo.replenishDate = res.data.selectDate |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="head"> |
| | | <el-date-picker |
| | | v-model="selectDate" |
| | | type="daterange" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | v-model="orderInfo.replenishDate" |
| | | :default-time="defaultTime" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY-MM-DD" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | format="YYYY/MM/DD" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | |
| | | dataTotal : 0, |
| | | pageSize : 50 |
| | | }) |
| | | |
| | | let printRow = ref({ |
| | | list: null, |
| | | }) |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | return |
| | | } |
| | | ElMessage.warning(t('order.printingNumber')+rowClickIndex.value.printingNumber) |
| | | let selectRecords = ref(null) |
| | | selectRecords=rowClickIndex.value |
| | | printRow.value.list = JSON.stringify([selectRecords]) |
| | | dialogTableVisible.value = true |
| | | sheetIndex.value=4 |
| | | if(rowClickIndex.value.processReview===2 && rowClickIndex.value.orderReview===0){ |
| | |
| | | <print-sheet1 id="child" v-if="sheetIndex===1" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet2 id="child" v-else-if="sheetIndex===2" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet3 id="child" v-else-if="sheetIndex===3" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet4 id="child" v-else-if="sheetIndex===4" :orderId="rowClickIndex.orderId" /> |
| | | <print-sheet4 id="child" v-else-if="sheetIndex===4" :orderId="rowClickIndex.orderId" :dataList="printRow.list"/> |
| | | <print-sheet5 id="child" v-else-if="sheetIndex===5" :orderId="rowClickIndex.orderId" /> |
| | | |
| | | </el-dialog> |
| | |
| | | |
| | | @ApiOperation("补片流程卡明细查询接口") |
| | | @SaCheckPermission("printReplenishFlowCard.search") |
| | | @PostMapping("/selectPrint/{selectTime1}/{selectTime2}") |
| | | @PostMapping("/selectPrint/{selectDate}") |
| | | public Result selectPrint( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable List<String> selectDate, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.success(replenishService.selectPrintSv(selectTime1,selectTime2, flowCard)); |
| | | return Result.success(replenishService.selectPrintSv(selectDate, flowCard)); |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | Integer getPrintLabelCount(String processId, String technologyNumber); |
| | | |
| | | List<Map<String, String>> selectReplenishPrintMp(Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | List<Map<String, String>> selectReplenishPrintMp(String selectTime1, String selectTime2, FlowCard flowCard); |
| | | |
| | | List<Map<String, Object>> getRepairPrintCustomData(String processId, String technologyNumber, String reportingWorkId, Integer orderNumber); |
| | | |
| | |
| | | |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | |
| | | // 默认时间范围:过去15天 |
| | | // 默认时间范围:过去7天 |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | | String startDate = LocalDate.now().minusDays(7).toString(); |
| | | |
| | | // 用户自定义时间段 |
| | | if (selectDate != null && selectDate.size() == 2) { |
| | |
| | | return oddNumbers; |
| | | } |
| | | |
| | | public Object selectPrintSv(java.sql.Date selectTime1, java.sql.Date selectTime2, FlowCard flowCard) { |
| | | public Object selectPrintSv(List<String> selectDate, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectReplenishPrintMp(selectTime1,selectTime2,flowCard)); |
| | | // 默认时间范围:过去7天 |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(7).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); |
| | | } |
| | | } |
| | | // 返回时间段 |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate", list); |
| | | map.put("data", flowCardMapper.selectReplenishPrintMp(startDate,endDate,flowCard)); |
| | | map.put("type", flowCardMapper.selectType()); |
| | | return map; |
| | | } |
| | |
| | | result = orderDetails.stream() |
| | | .collect(Collectors.collectingAndThen( |
| | | Collectors.toMap( |
| | | map -> map.get("order_id"), |
| | | map -> { |
| | | Object v = map.get("order_id"); |
| | | if (v == null) { |
| | | v = map.get("orderId"); |
| | | } |
| | | return String.valueOf(v); |
| | | }, |
| | | map -> map, |
| | | (existing, replacement) -> existing // 保留第一个出现的 |
| | | (existing, replacement) -> existing // 保留第一个 |
| | | ), |
| | | map -> new ArrayList<>(map.values()) |
| | | m -> new ArrayList<>(m.values()) |
| | | )); |
| | | //循环获取图片 |
| | | List<OrderFile> orderFiles = new ArrayList<>(); |
| | | for (Map<String,Object> obj : result) { |
| | | List<OrderFile> orderFile = orderFileMapper.selectList(new QueryWrapper<OrderFile>() |
| | | .select("order_id, order_number, image_base64") |
| | | .eq("order_id", obj.get("order_id")) |
| | | for (Map<String, Object> obj : result) { |
| | | |
| | | Object orderId = obj.get("order_id"); |
| | | if (orderId == null) { |
| | | orderId = obj.get("orderId"); |
| | | } |
| | | |
| | | List<OrderFile> orderFile = orderFileMapper.selectList( |
| | | new QueryWrapper<OrderFile>() |
| | | .select("order_id, order_number, image_base64") |
| | | .eq("order_id", orderId) |
| | | ); |
| | | if (orderFile != null){ |
| | | |
| | | if (orderFile != null && !orderFile.isEmpty()) { |
| | | orderFiles.addAll(orderFile); |
| | | } |
| | | } |