Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
| | |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import {toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | |
| | | buttons: [ |
| | | {'code': 'out', 'name': t('ingredientsStock.materialOutbound'),status: 'primary'}, |
| | | {'code': 'add', 'name': t('ingredients.materialAddition'),status: 'primary'}, |
| | | {'code': 'delete', 'name': t('basicData.delete'),status: 'primary'}, |
| | | ], |
| | | /*import: false, |
| | | export: true, |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | case 'delete': { |
| | | |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | ElMessageBox.confirm("确认删除?", |
| | | { |
| | | confirmButtonText: t('basicData.confirmButtonText'), |
| | | cancelButtonText: t('basicData.cancelButtonText'), |
| | | distinguishCancelAndClose: true, |
| | | type: 'warning', |
| | | } |
| | | ).then(()=>{ |
| | | let id = "" |
| | | const array = []; |
| | | if (values.value===t('ingredientsStock.inventory')){ |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | array.push(selectRecords[i].id) |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].id |
| | | } else { |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | }else{ |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | array.push(selectRecords[i].useId) |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].useId |
| | | } else { |
| | | id += selectRecords[i].useId + "|" |
| | | } |
| | | } |
| | | } |
| | | console.log(selectRecords) |
| | | let flowData = ref({ |
| | | materialInventory: selectRecords, |
| | | ids: id, |
| | | creator: userStore.user.userName |
| | | |
| | | }) |
| | | request.post(`/materialInventory/deleteMaterialInventory`,flowData.value).then((res) => { |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | router.push({path:'/main/ingredientsStock/selectIngredientsStock', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | }).catch((action)=>{ |
| | | }) |
| | | break |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | <script setup> |
| | | import {reactive, ref} from "vue"; |
| | | import {useI18n} from "vue-i18n"; |
| | | import deepClone from "@/utils/deepClone" |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import request from "@/utils/request"; |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import useOrderInfoStore from "@/stores/sd/order/orderInfo"; |
| | | import request from "@/utils/request"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import userInfo from "@/stores/userInfo"; |
| | | |
| | | const { t } = useI18n() |
| | | const {t} = useI18n() |
| | | const userStore = useUserInfoStore() |
| | | const user = userInfo() |
| | | const orderInfo = useOrderInfoStore() |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | height:'100%', |
| | | height: '100%', |
| | | loading: false, |
| | | border: "full",//表格加边框 |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30, useKey: true},//鼠标移动或选择高亮 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30, useKey: true},//鼠标移动或选择高亮 |
| | | id: 'ProjectMange', |
| | | scrollX:{enabled: true}, |
| | | scrollY:{ enabled: true ,gt:0},//开启虚拟滚动 |
| | | showOverflow:true, |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | /*formConfig: { |
| | | data: { |
| | | width: '', |
| | | height: '', |
| | | quantity: '' |
| | | }, |
| | | items: [ |
| | | { field: 'width', title: t('order.width')+':', itemRender: { name: 'VxeInput' } }, |
| | | { field: 'height', title: t('order.height')+':', itemRender: { name: 'VxeInput' } }, |
| | | { field: 'quantity', title: t('order.quantity')+':', itemRender: { name: 'VxeInput' } }, |
| | | { |
| | | itemRender: { |
| | | name: 'VxeButtonGroup', |
| | | options: [ |
| | | { type: 'submit', content: t('craft.sure'), status: 'primary' }, |
| | | { type: 'reset', content: t('product.msg.reset') } |
| | | ] |
| | | } |
| | | } |
| | | ] |
| | | },*/ |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {field: 'id', width: 100,title: '工程号',}, |
| | | {field: '',width: 50,title: '名称',}, |
| | | {field: 'id', width: 50,title: '膜系',}, |
| | | {field: 'id', width: 50,title: '厚度',}, |
| | | {field: 'id', width: 50,title: '类型',}, |
| | | {field: 'id', width: 50,title: '状态',}, |
| | | {field: 'id', width: 50,title: '数量',}, |
| | | {field: 'id', width: 50,title: '面积',}, |
| | | {field: 'id', width: 100,title: '流程卡数量',}, |
| | | {field: 'id', width: 100,title: '原片使用数',}, |
| | | {field: 'id', width: 70,title: '流程卡',}, |
| | | {field: 'id', width: 100,title: '钢化装载率',}, |
| | | {field: '',width: 100,title: '钢化炉数',}, |
| | | {field: '',width: 100,title: '平均切裁率',}, |
| | | {field: '',width: 100,title: '有效切裁率',}, |
| | | {field: '',width: 100,title: '尾片切裁率',}, |
| | | {field: '',width: 100,title: '原料使用数',}, |
| | | {field: '',width: 100,title: '平均切裁率',}, |
| | | {field: '',width: 50,title: '备注',}, |
| | | {field: '',width: 100,title: '创建人',}, |
| | | {field: '',width: 100,title: '创建时间',}, |
| | | {field: '',width: 100,title: '修改时间',}, |
| | | |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {field: 'projectNumber', width: 100, title: '工程号', filters: [{data: ''}], slots: {filter: 'num1_filter'},}, |
| | | {field: 'projectName', width: 50, title: '名称',}, |
| | | {field: 'glassType', width: 50, title: '膜系',}, |
| | | {field: 'thickness', width: 50, title: '厚度',}, |
| | | {field: 'type', width: 50, title: '类型',}, |
| | | {field: 'state', width: 50, title: '状态',}, |
| | | {field: 'quantity', width: 50, title: '数量',}, |
| | | {field: 'area', width: 50, title: '面积',}, |
| | | {field: 'processCardQuantity', width: 100, title: '流程卡数量',}, |
| | | {field: 'usingQuantity', width: 100, title: '原片使用数',}, |
| | | {field: 'processCardCollection', width: 70, title: '流程卡',}, |
| | | {field: 'temperedLoadingRate', width: 100, title: '钢化装载率',}, |
| | | {field: 'numberOfTemperingFurnaces', width: 100, title: '钢化炉数',}, |
| | | {field: 'averageCuttingRate', width: 100, title: '平均切裁率',}, |
| | | {field: 'effectiveCuttingRate', width: 100, title: '有效切裁率',}, |
| | | {field: 'residueGlassCuttingRate', width: 100, title: '尾片切裁率',}, |
| | | {field: 'amountOfOriginalGlassUsage1', width: 100, title: '原料使用数',}, |
| | | {field: 'averageCuttingRate1', width: 100, title: '平均切裁率',}, |
| | | {field: 'notes', width: 50, title: '备注',}, |
| | | {field: 'creator', width: 100, title: '创建人',}, |
| | | {field: 'createTime', width: 100, title: '创建时间',}, |
| | | {field: 'modifyTime', width: 100, title: '修改时间',}, |
| | | ],//表头参数 |
| | | data:null,//表格数据 |
| | | data: null,//表格数据 |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | slots:{ |
| | | slots: { |
| | | buttons: "toolbar_buttons" |
| | | }, |
| | | }, |
| | | |
| | | }) |
| | | const oderInfo = useOrderInfoStore() |
| | | |
| | | |
| | | //定义工程状态 |
| | | const optionVal = ref('0') |
| | | const optionVal = ref('') |
| | | const options = [ |
| | | { |
| | | value: '0', |
| | |
| | | }, |
| | | ] |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | let startTime = orderInfo.workOrderDate[0] |
| | | let endTime = orderInfo.workOrderDate[1] |
| | | request.post(`/processCard/flowCard/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | //公共函数 |
| | | function buildRequestParams() { |
| | | let startSelectTime = orderInfo.workOrderDate[0]; |
| | | let endSelectTime = orderInfo.workOrderDate[1]; |
| | | |
| | | const params = { |
| | | startSelectTime, |
| | | endSelectTime, |
| | | }; |
| | | |
| | | return params; |
| | | } |
| | | |
| | | //筛选条件 |
| | | let filterData = ref({ |
| | | projectNumber: '', |
| | | }) |
| | | // 定义数据返回结果,使用ref创建响应式数据,初始化为空数组 |
| | | let produceList = ref([]) |
| | | |
| | | // 获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 15) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | // 初始化时间范围,若为空则设为近七天时间 |
| | | if (orderInfo.workOrderDate[0] === "" && orderInfo.workOrderDate[1] === "") { |
| | | orderInfo.workOrderDate = getNowTime(); |
| | | } |
| | | //获取选中时间 |
| | | let startSelectTime = orderInfo.workOrderDate[0] |
| | | let endSelectTime = orderInfo.workOrderDate[1] |
| | | // 首次加载数据 |
| | | request.post(`/glassOptimize/optimizeProjectMange/${startSelectTime}/${endSelectTime}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList.value); |
| | | gridOptions.loading = false; |
| | | } else { |
| | | ElMessage.warning(res.msg); |
| | | } |
| | | }) |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | function filterChanged(column) { |
| | | gridOptions.loading = true; |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0] != undefined ? column.datas[0] : '' |
| | | value = value.trim(); |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.') > -1) { |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]: value |
| | | } |
| | | } else { |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | const params = buildRequestParams(); |
| | | console.log('即将发送给后端的筛选参数:', filterData.value); |
| | | request.post(`/glassOptimize/optimizeProjectMange/${params.startSelectTime}/${params.endSelectTime}`, filterData.value).then((res) => { |
| | | console.log('已收到服务器响应,响应码:', res.code); |
| | | console.log('响应数据:', res.data); |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading=false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | }); |
| | | } |
| | | |
| | | // 点击查询按钮触发的函数,根据当前筛选条件获取数据并加载到表格 |
| | | const getWorkOrder = () => { |
| | | const params = buildRequestParams(); |
| | | request.post(`/glassOptimize/optimizeProjectMange/${params.startSelectTime}/${params.endSelectTime}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | produceList.value = deepClone(res.data.data); |
| | | gridOptions.data = produceList.value; |
| | | xGrid.value.reloadData(produceList.value); |
| | | gridOptions.loading = false; |
| | | } else { |
| | | ElMessage.warning(res.msg); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div id="mange"> |
| | | <div id="select"> |
| | | <span>优化日期</span> |
| | | <el-date-picker |
| | | style="margin-left:10px; margin-top: -5px; " |
| | | v-model="oderInfo.mangeDate" |
| | | type="daterange" |
| | | format="YYYY/MM/DD" |
| | | value-format="YYYY-MM-DD" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | :default-time="defaultTime" |
| | | <div id="mange"> |
| | | <div id="select"> |
| | | <span>优化日期</span> |
| | | <el-date-picker |
| | | style="margin-left:10px; margin-top: -5px; " |
| | | v-model="orderInfo.workOrderDate" |
| | | :default-time="defaultTime" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | type="daterange" |
| | | format="YYYY/MM/DD" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | <!-- <vxe-input--> |
| | | <!-- style="margin-left:10px; "--> |
| | | <!-- placeholder="输入工程号或流程卡号"--> |
| | | <!-- >--> |
| | | <!-- </vxe-input>--> |
| | | |
| | | /> |
| | | <vxe-input |
| | | style="margin-left:10px; " |
| | | placeholder="输入工程号或流程卡号" |
| | | > |
| | | </vxe-input> |
| | | |
| | | <span class="input">工程状态</span> |
| | | <el-select |
| | | style="margin-left:10px; margin-top: -5px; width: 150px" |
| | | :default-first-option="true" |
| | | ref="getSelect" |
| | | v-model="optionVal" |
| | | clearable |
| | | 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 |
| | | style="margin-left:10px;margin-top: -5px" |
| | | :icon="Search" |
| | | type="primary" |
| | | @click="getWorkOrder">{{ $t('basicData.search') }} |
| | | </el-button> |
| | | </div> |
| | | |
| | | <vxe-grid |
| | | @filter-change="filterChanged" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | <span class="input">工程状态</span> |
| | | <el-select |
| | | style="margin-left:10px; margin-top: -5px; width: 150px" |
| | | :default-first-option="true" |
| | | ref="getSelect" |
| | | v-model="optionVal" |
| | | clearable |
| | | class="m-2" |
| | | @change="getWorkOrder" |
| | | > |
| | | <template #num2_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')" @change="changeFilterEvent($event, option, $panel)"> |
| | | <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option> |
| | | <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option> |
| | | </vxe-select> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input |
| | | type="type" |
| | | v-model="option.data" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <!--查询--> |
| | | <el-button |
| | | style="margin-left:10px;margin-top: -5px" |
| | | :icon="Search" |
| | | type="primary" |
| | | @click="getWorkOrder">{{ $t('basicData.search') }} |
| | | </el-button> |
| | | </div> |
| | | |
| | | <vxe-grid |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | @filter-change="filterChanged" |
| | | > |
| | | <template #select_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <vxe-select v-model="option.data" @change="changeFilterEvent($event, option, $panel)"> |
| | | <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option> |
| | | <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option> |
| | | </vxe-select> |
| | | </div> |
| | | </template> |
| | | </vxe-grid> |
| | | <div id="last"> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="text" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </vxe-grid> |
| | | <div id="last"> |
| | | <span> |
| | | 小片数<vxe-input size="small" class="input" disabled></vxe-input> |
| | | 小片面<vxe-input size="small" class="input" disabled></vxe-input> |
| | | 原片数<vxe-input size="small" class="input" disabled></vxe-input> |
| | | 原片面<vxe-input size="small" class="input" disabled></vxe-input> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #mange{ |
| | | #mange { |
| | | width: 100%; |
| | | height: 85%; |
| | | } |
| | | |
| | | #last { |
| | | margin-top: 10px; |
| | | } |
| | | .input{ |
| | | |
| | | .input { |
| | | width: 80px; |
| | | margin-left: 15px; |
| | | } |
| | |
| | | return Result.seccess(materialInventoryService.getMaterialLogReport(type,pageNum,pageSize,selectDate,materialLog)); |
| | | } |
| | | |
| | | @ApiOperation("物料库存删除") |
| | | @SaCheckPermission("createOutbound.search") |
| | | @PostMapping("/deleteMaterialInventory") |
| | | public Result deleteMaterialInventory(@RequestBody Map<String,Object> object){ |
| | | return Result.seccess(materialInventoryService.deleteMaterialInventory(object)); |
| | | } |
| | | |
| | | @ApiOperation("物料报表导出") |
| | | @PostMapping("/exportMaterialLogReport/{type}") |
| | | public void exportMaterialLogReport(@PathVariable String type, HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.pp.OptimizeProjectMange; |
| | | import com.example.erp.service.pp.GlassOptimizeService; |
| | | import com.example.erp.service.pp.WorkOrderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="优化管理controller",tags={"优化管理操作接口"}) |
| | |
| | | return Result.seccess(glassOptimizeService.getFlowCardList(optionVal,radio)); |
| | | } |
| | | |
| | | //工程管理查询 |
| | | @ApiOperation("工程管理查询接口") |
| | | @PostMapping("/optimizeProjectMange/{startSelectTime}/{endSelectTime}") |
| | | public Result optimizeProjectMange( |
| | | @PathVariable Date startSelectTime, |
| | | @PathVariable Date endSelectTime, |
| | | @RequestBody OptimizeProjectMange optimizeProjectMange) { |
| | | return Result.seccess(glassOptimizeService.OptimizeProjectMange(startSelectTime,endSelectTime,optimizeProjectMange)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | @TableName("pp.v_optimize_en_project_manage") |
| | | public class OptimizeProjectMange { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private String projectNumber; |
| | | private String projectName; |
| | | private String glassType; |
| | | private Double thickness; |
| | | private Integer type; |
| | | private Integer state; |
| | | private Double quantity; |
| | | private Double area; |
| | | private Integer processCardQuantity; |
| | | private Integer usingQuantity; |
| | | private String orderId; |
| | | private String temperedLoadingRate; |
| | | private Integer numberOfTemperingFurnaces; |
| | | private String averageCuttingRate; |
| | | private String effectiveCuttingRate; |
| | | private String residueGlassCuttingRate; |
| | | private String processCardCollection; |
| | | private String averageCuttingRate1; |
| | | private String notes; |
| | | private String creator; |
| | | private LocalDate createTime; |
| | | private LocalDate modifyTime; |
| | | |
| | | } |
| | |
| | | Boolean insertMaterialStore(@Param("type") String type, |
| | | @Param("json") String json); |
| | | |
| | | Boolean deleteMaterialInventory(@Param("ids") List<Long> ids); |
| | | |
| | | Boolean updateMaterialStore(@Param("type") String type, |
| | | @Param("json") String json, @Param("id") Long id); |
| | | |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | |
| | | import com.example.erp.entity.pp.OptimizeProjectMange; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | |
| | | //工单管理查询未转工单数据 |
| | | List<OrderGlassDetail> selectWordOrder(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail); |
| | | |
| | | //创建工程膜系查询 |
| | | List<Map<String, Object>> getFlowCardListMp(String optionVal, Integer radio); |
| | | |
| | | //工程管理工程号查询 |
| | | List<OptimizeProjectMange> optimizeProjectMangeMp(Date startSelectTime, Date endSelectTime, OptimizeProjectMange optimizeProjectMange); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | public Boolean deleteMaterialInventory(Map<String,Object> object) { |
| | | String creator = ""; |
| | | if (object.get("creator") != null) { |
| | | creator = object.get("creator").toString(); |
| | | } |
| | | String ids = ""; |
| | | if (object.get("ids") != null) { |
| | | ids = object.get("ids").toString(); |
| | | } |
| | | List<Long> id=new ArrayList<>(); |
| | | if(!ids.isEmpty()){ |
| | | List<String> result = StrUtil.split(ids, '|'); |
| | | id=result.stream().map(Long::valueOf).collect(Collectors.toList()); |
| | | } |
| | | materialInventoryMapper.deleteMaterialInventory(id); |
| | | Log log = new Log(); |
| | | log.setOperator(creator); |
| | | log.setContent(object.toString()); |
| | | log.setFunction("deleteMaterialInventory:"+ids); |
| | | logService.saveLog(log); |
| | | return true; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | 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.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.pp.OptimizeProjectMange; |
| | | import com.example.erp.mapper.pp.GlassOptimizeMapper; |
| | | import com.example.erp.mapper.pp.WorkOrderMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | |
| | | GlassOptimizeMapper glassOptimizeMapper; |
| | | |
| | | |
| | | |
| | | //工程查询流程卡 |
| | | public Map<String, Object> getFlowCardList(String optionVal, Integer radio) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", glassOptimizeMapper.getFlowCardListMp(optionVal, radio)); |
| | | |
| | | return map; |
| | | } |
| | | |
| | | //工程管理查询 |
| | | public Map<String, Object> OptimizeProjectMange(Date startSelectTime, Date endSelectTime, OptimizeProjectMange optimizeProjectMange) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", glassOptimizeMapper.optimizeProjectMangeMp(startSelectTime, endSelectTime , optimizeProjectMange)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | |
| | | </select> |
| | | |
| | | <select id="deleteMaterialInventory"> |
| | | delete from |
| | | mm.material_inventory mi |
| | | <where> |
| | | <if test="ids != null and ids != ''"> |
| | | and mi.id in |
| | | <foreach item="id" collection="ids" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <!-- </association>--> |
| | | |
| | | </resultMap> |
| | | |
| | | <resultMap id="optimizeProjectMangeMap" type="com.example.erp.entity.pp.OptimizeProjectMange"> |
| | | <result property="id" column="id"/> |
| | | <result property="projectNumber" column="project Number"/> |
| | | <result property="projectName" column="project Name"/> |
| | | <result property="glassType" column="glass Type"/> |
| | | <result property="thickness" column="thickness"/> |
| | | <result property="type" column="type"/> |
| | | <result property="state" column="state"/> |
| | | <result property="quantity" column="quantity"/> |
| | | <result property="area" column="area"/> |
| | | <result property="processCardQuantity" column="process Card Quantity"/> |
| | | <result property="usingQuantity" column="using Quantity"/> |
| | | <result property="temperedLoadingRate" column="tempered loading rate"/> |
| | | <result property="numberOfTemperingFurnaces" column="number of tempering furnaces"/> |
| | | <result property="averageCuttingRate" column="average cutting rate"/> |
| | | <result property="effectiveCuttingRate" column="effective cutting rate"/> |
| | | <result property="residueGlassCuttingRate" column="residue glass cutting rate"/> |
| | | <result property="processCardCollection" column="process card collection"/> |
| | | <result property="averageCuttingRate1" column="average cutting rate1"/> |
| | | <result property="notes" column="notes"/> |
| | | <result property="creator" column="creator"/> |
| | | <result property="createTime" column="create time"/> |
| | | <result property="modifyTime" column="modify time"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectWordOrder" resultMap="wordOrderMap"> |
| | | select |
| | |
| | | on fcss.process_id = fc.process_id and fcss.order_number = fc.order_number |
| | | where position(#{optionVal} in ogd.glass_child) |
| | | GROUP BY fc.process_id, fc.technology_number |
| | | ORDER BY fc.process_id,fc.technology_number |
| | | ORDER BY fc.process_id, fc.technology_number |
| | | </select> |
| | | |
| | | <select id="optimizeProjectMangeMp" resultMap="optimizeProjectMangeMap"> |
| | | select p.`id` AS `id`, |
| | | p.`project_no` AS `Project Number`, |
| | | p.`project_name` AS `Project Name`, |
| | | p.`glass_type` AS `Glass Type`, |
| | | p.`glass_thickness` AS `Thickness`, |
| | | p.`type` AS `Type`, |
| | | p.`state` AS `State`, |
| | | p.`glass_total` AS `Quantity`, |
| | | p.`glass_total_area` AS `Area`, |
| | | p.`process_qty` AS `Process Card Quantity`, |
| | | p.`raw_stock_qty` AS `Using Quantity`, |
| | | concat((`p`.`load_rate` * 100), ' %') AS `Tempered loading rate`, |
| | | `p`.`furnaces_qty` AS `Number of tempering furnaces`, |
| | | concat(`p`.`avg_cut_pct`, ' %') AS `Average cutting rate`, |
| | | concat(`p`.`valid_cut_pct`, ' %') AS `Effective cutting rate`, |
| | | concat(`p`.`last_cut_pct`, ' %') AS `Residue glass cutting rate`, |
| | | `p`.`process_cards` AS `Process card collection`, |
| | | `p`.`frist_stock_qty` AS `Amount of original glass usage 1`, |
| | | concat(`p`.`frist_cut_pct`, ' %') AS `Average cutting rate 1`, |
| | | `p`.`remark` AS `Notes`, |
| | | `a`.`name` AS `Creator`, |
| | | `p`.`create_time` AS `Create time`, |
| | | `p`.`update_time` AS `Modify time` |
| | | from pp.optimize_project as p |
| | | left join pp.optimize_admin as a on p.creater = a.Id |
| | | where (`p`.`state` > -(1)) |
| | | and `p`.`create_time` > #{startSelectTime} |
| | | and `p`.`create_time` < #{endSelectTime} |
| | | <if test="optimizeProjectMange.projectNumber != null and optimizeProjectMange.projectNumber != ''"> |
| | | and p.project_no regexp #{optimizeProjectMange.projectNumber} |
| | | </if> |
| | | order by `p`.`create_time` desc, `p`.`project_no` |
| | | </select> |
| | | |
| | | </mapper> |