Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | transferOrder:'تحويل الطلب', |
| | | perimeter:'محيط', |
| | | deleteNo:'فشل الحذف، تحقق مما إذا كان قد تم تقسيمة', |
| | | msg:'请选择所有数据' |
| | | msg:'请选择所有数据', |
| | | msgSelect:'请选择订单号' |
| | | |
| | | }, |
| | | processCard:{ |
| | |
| | | transferOrder:'Transfer Order', |
| | | perimeter:'perimeter', |
| | | deleteNo:'Delete failed Check whether the shelf has been splited', |
| | | msg:'Please select all data' |
| | | msg:'Please select all data', |
| | | msgSelect:'请选择订单号' |
| | | |
| | | }, |
| | | processCard:{ |
| | |
| | | transferOrder:'Трансферный ордер', |
| | | perimeter:'Внешний край', |
| | | deleteNo:'Удаление неудачных проверок, чтобы проверить, разделены ли они', |
| | | msg:'Пожалуйста, выберите все данные' |
| | | msg:'Пожалуйста, выберите все данные', |
| | | msgSelect:'请选择订单号' |
| | | |
| | | }, |
| | | processCard:{ |
| | |
| | | transferOrder:'转工单', |
| | | perimeter:'周长', |
| | | deleteNo:'删除失败,检查是否已分架', |
| | | msg:'请选择所有数据' |
| | | msg:'请选择所有数据', |
| | | msgSelect:'请选择订单号' |
| | | |
| | | }, |
| | | processCard:{ |
| | |
| | | |
| | | <div class="row1" v-if="item.heat_layout_id!==null"> |
| | | |
| | | <div class="cell" v-if="item.heat_layout_id!==null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div> |
| | | <!-- <div class="cell" v-if="item.heat_layout_id!==null"></div>--> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹胶')">胶片</span> |
| | | <span v-else-if="item.process.includes('中空')">中空</span> |
| | | <span v-else-if="item.process.includes('百叶')">百叶</span> |
| | | <span v-else></span> |
| | | <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div> |
| | | |
| | | </div> |
| | | <div class="row2" v-else> |
| | | <!-- <div class="row2" v-else> |
| | | <span>{{ item.customer_name }}</span> |
| | | <span>{{ item.order_id }}</span> |
| | | <span v-if="item.process.includes('夹胶')">胶片</span> |
| | | <span v-else-if="item.process.includes('中空')">中空</span> |
| | | <span v-else-if="item.process.includes('百叶')">百叶</span> |
| | | <span v-else></span> |
| | | </div> |
| | | </div>--> |
| | | |
| | | <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)">{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div> |
| | | <div class="row3" v-else>{{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}}</div> |
| | | <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)"> |
| | | <span v-if="item.heat_layout_id!==null" style="font-size: 6pt"> |
| | | ({{ item.heat_layout_id }}/{{ item.heat_layout_sort }}) |
| | | <template v-if="item.stock_id!=null"> |
| | | {{ item.stock_id }} |
| | | </template> |
| | | </span> |
| | | {{JSON.parse(item.other_columns).S02}}={{item.quantity}} |
| | | </div> |
| | | <div class="row3" v-else> |
| | | <span v-if="item.heat_layout_id!==null" style="font-size: 6pt"> |
| | | ({{ item.heat_layout_id }}/{{ item.heat_layout_sort }}) |
| | | <template v-if="item.stock_id!=null"> |
| | | {{ item.stock_id }} |
| | | </template> |
| | | </span> |
| | | |
| | | {{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}} |
| | | </div> |
| | | <div class="row5"> |
| | | <span style="white-space: pre-wrap;font-size: 6pt">{{ item.building_number?item.building_number.replace(/\r|\n|\s/g,''):'' }}</span> |
| | | <span v-if="item.bend_radius!=null">R={{item.bend_radius}}</span> |
| | |
| | | <template v-if="type==='3'" v-for="(item,id) in labelList"> |
| | | <div v-if="type==='3'" id="entirety" v-for="n in item.quantity" > |
| | | |
| | | <div class="row1" v-if="item.heat_layout_id!=null"> |
| | | |
| | | <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div> |
| | | <div class="row1" > |
| | | <!-- <div class="cell" v-if="item.heat_layout_id!=null">{{ item.heat_layout_id }}/{{ item.heat_layout_sort }}</div>--> |
| | | <span style="font-size: 8pt">{{ item.customer_name }}</span> |
| | | |
| | | <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div> |
| | | <!-- <div class="cell1" v-if="item.stock_id!=null">{{ item.stock_id }}</div>--> |
| | | |
| | | </div> |
| | | <div class="row2" v-else> |
| | | <!-- <div class="row2" v-else> |
| | | <span style="font-size: 8pt">{{ item.customer_name }}</span> |
| | | </div> |
| | | </div>--> |
| | | <div class="row2" style="font-size: 8pt" >{{item.order_id}} |
| | | <span style="font-size: 8pt">{{ remarks }}</span> |
| | | </div> |
| | | <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)">{{JSON.parse(item.other_columns).S02}}={{item.quantity}}</div> |
| | | <div class="row3" v-else>{{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}}</div> |
| | | <div class="row3" v-if="item.other_columns!=null&&(JSON.parse(item.other_columns).S02!=null)"> |
| | | <span v-if="item.heat_layout_id!==null" style="font-size: 6pt"> |
| | | ({{ item.heat_layout_id }}/{{ item.heat_layout_sort }}) |
| | | <template v-if="item.stock_id!=null"> |
| | | {{ item.stock_id }} |
| | | </template> |
| | | </span> |
| | | {{JSON.parse(item.other_columns).S02}}={{item.quantity}} |
| | | </div> |
| | | <div class="row3" v-else> |
| | | <span v-if="item.heat_layout_id!==null" style="font-size: 6pt"> |
| | | ({{ item.heat_layout_id }}/{{ item.heat_layout_sort }}) |
| | | <template v-if="item.stock_id!=null"> |
| | | {{ item.stock_id }} |
| | | </template> |
| | | </span> |
| | | {{Math.round(item.width)}}x{{Math.round(item.height)}}={{item.quantity}} |
| | | </div> |
| | | |
| | | <div class="row5"> |
| | | <span style="white-space: pre-wrap;font-size: 8pt">{{ item.building_number?item.building_number.replace(/\r|\n|\s/g,''):'' }}</span> |
| | |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | }) |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | //第一次加载数据 |
| | | request.post(`/report/damageReport/1/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | request.post(`/report/damageReport/1/${total.pageSize}/${startTime}/${newEndTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total*1 |
| | |
| | | const selectPageList = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | |
| | | request.post(`/report/damageReport/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | request.post(`/report/damageReport/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | |
| | |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | request.post(`/report/damageReport/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | request.post(`/report/damageReport/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total * 1 |
| | |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | request.post(`/report/damageReport/1/${total.pageSize}/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | request.post(`/report/damageReport/1/${total.pageSize}/${startTime}/${newEndTime}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total*1 |
| | |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | }) |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | //第一次加载数据 |
| | | request.post(`/report/selectProcessToBeCompleted/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, filterData.value).then((res) => { |
| | | request.post(`/report/selectProcessToBeCompleted/${startTime}/${newEndTime}/${inputVal}/${inputProject}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | // total.dataTotal = res.data.total.total*1 |
| | |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | |
| | | request.post(`/report/selectProcessToBeCompleted/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | request.post(`/report/selectProcessToBeCompleted/${pageNum.value}/${total.pageSize}/${startTime}/${newEndTime}/${inputVal}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | |
| | |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | request.post(`/report/selectProcessToBeCompleted/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, filterData.value).then((res) => { |
| | | let date = new Date(endTime); // 将日期字符串转为 Date 对象 |
| | | // 使用 setDate 方法加一天 |
| | | date.setDate(date.getDate() + 1); |
| | | let newEndTime = date.toISOString().split('T')[0]; // 获取 YYYY-MM-DD 格式的字符串 |
| | | request.post(`/report/selectProcessToBeCompleted/${startTime}/${newEndTime}/${inputVal}/${inputProject}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | // total.dataTotal = res.data.total.total*1 |
| | |
| | | button.name=t('basicData.review') |
| | | titleUploadData.value.qualityInspector=user.user.userName |
| | | } |
| | | |
| | | |
| | | gridOptions.toolbarConfig.buttons.push(button) |
| | | } |
| | | // getQuantity() |
| | |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'saveReportingWork': { |
| | | case 'saveReportingWork': {//保存 |
| | | const errMap = await $grid.validate(true) |
| | | if (errMap) { |
| | | ElMessage.error(t('basicData.msg.checkoutLose')) |
| | |
| | | saveReportingWork(1,'save') |
| | | break |
| | | } |
| | | case 'update': { |
| | | case 'update': {//修改 |
| | | //根据补片状态判断是否能修改 |
| | | // request.post(`/reportingWork/getPatchCondition/${route.query.reportingWorkId}`).then(async (res) => { |
| | | // if (res.code == 200) { |
| | |
| | | } |
| | | } |
| | | }, |
| | | menuClick({menu, row, column}) { |
| | | menuClick({menu, row, column}) {//右键菜单 |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | |
| | | return item.saveFlag === 0 |
| | | }) |
| | | let process = titleUploadData.value.thisProcess |
| | | //暂时取消 |
| | | for(let item of uniqueByOrderNum){ |
| | | if(!checkSameNumForId(notFinishList,item.order_number ) && (process=='夹胶' || process=='中空' || process=='包装' ||process=='打胶和粘框')){ |
| | | ElMessage.error(`${t('reportingWorks.pleaseCheckTheOrderNumber1')}':' |
| | |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | const checkedList = $grid.getCheckboxRecords() |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'transferOrder': { |
| | | if (checkedList.length !== 1) { |
| | | ElMessage.warning(t('workOrder.msgSelect')) |
| | | return |
| | | } |
| | | const idList = [] |
| | | $grid.getCheckboxRecords().forEach(item => { |
| | | idList.push(item.orderId) |
| | |
| | | List<Map<String, String>> SelectReworlDetailMpReview(String processIdStr, String technologyStr, String process, String previousProcess, String laminating); |
| | | |
| | | String getProcessLaminating(String process); |
| | | |
| | | String selectOrderid(String processIdStr); |
| | | } |
| | |
| | | public Boolean updateLayoutStatusSv(String processId, Integer state) { |
| | | |
| | | if (!processId.isEmpty()) { |
| | | // Integer Status = flowCardMapper.selectLayoutStatus(processId); |
| | | |
| | | flowCardMapper.updateLayoutStatusMp(processId, state); |
| | | |
| | | |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | |
| | | String productionId = ""; |
| | | if (object.get("productionId") != null) { |
| | | productionId = object.get("productionId").toString(); |
| | |
| | | List<OrderGlassDetail> orderGlassDetailList = |
| | | orderGlassDetailMapper.selectList( |
| | | new QueryWrapper<OrderGlassDetail>() |
| | | .eq("order_id", flowCard.getProcessId().substring(0, 10)) |
| | | .eq("order_id", orderId) |
| | | .eq("order_number", flowCard.getOrderNumber()) |
| | | ); |
| | | List<OrderProcessDetail> orderProcessDetailList = getOrderProcessDetails(orderGlassDetailList); |
| | | orderProcessDetailList.forEach( |
| | | orderGlassDetail -> orderGlassDetail.setProcessId(flowCard.getProcessId())); |
| | | |
| | | |
| | | //赋值订单工艺表 |
| | | orderProcessDetailMapper.insertOrderProcessDetail(orderProcessDetailList); |
| | |
| | | map.put("data", flowCardMapper.selectNoSchedulingMp(selectTime1, selectTime2, orderId, processes, flowCard)); |
| | | |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | |
| | | //是否包含切割 |
| | | //boolean containsCutting = flowCard.getProcess().contains("切割"); |
| | | String processSub=flowCard.getProcess().substring(0, 2); |
| | | if(processSub.equals("夹胶") || processSub.equals("中空")){ |
| | | if(processSub.equals("夹胶") || processSub.equals("中空")){//工艺是否包含夹胶中空 |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListLimt(flowCard.getProcessId(), String.valueOf(flowCard.getTechnologyNumber()),flowCard.getGlassChild(),flowCard.getProcess(),flowCard.getOrderId())); |
| | | |
| | | List<Map<String, Object>> detailList = flowCardMapper.getDetailList(flowCard.getProcessId(), flowCard.getTechnologyNumber(),flowCard.getProcess()); |
| | |
| | | |
| | | } |
| | | else { |
| | | |
| | | //流程卡明细数据 |
| | | if (printLike.equals("")||printLike.equals("null") ){ |
| | | itemmap.put("detail", flowCardMapper.getPrimaryListMerge(flowCard.getProcessId(), printMerge, flowCard.getOrderId())); |
| | |
| | | |
| | | public Map<String, Object> getSelectPrintLabelSv1(Map<String, Object> object) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | // Integer count=flowCardMapper.getPrintLabelCount(flowCard.getProcessId(), flowCard.getTechnologyNumber()); |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | // for (int i = 0; i < count; i++) { |
| | | itemmap.put("data", flowCardMapper.getPrintLabel1(flowCard.getProcessId(), flowCard.getTechnologyNumber())); |
| | | list.add(itemmap); |
| | | //} |
| | | |
| | | } |
| | | } |
| | | map.put("data", list); |
| | |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | // Integer count=flowCardMapper.getPrintLabelCount(flowCard.getProcessId(), flowCard.getTechnologyNumber()); |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | // for (int i = 0; i < count; i++) { |
| | | itemmap.put("data", flowCardMapper.getPrintLabelDetail(flowCard)); |
| | | list.add(itemmap); |
| | | //} |
| | | |
| | | } |
| | | } |
| | | map.put("data", list); |
| | |
| | | List<FlowCard> FlowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class); |
| | | if (!FlowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : FlowCardList) { |
| | | // flowCardMapper.printSortMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort()); |
| | | //判断保存的数据是否已存在 |
| | | Integer count = flowCardMapper.printAddSortCountMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort(),flowCard.getProcess()); |
| | | if (count >0){ |
| | |
| | | if (!flowCardList.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); // 用来存放已处理过的 processId |
| | | |
| | | if (lableType != 2){ |
| | | if (lableType != 2){//成品标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | | String processId = flowCard.getProcessId(); |
| | | |
| | |
| | | processedProcessIds.add(processId); |
| | | } |
| | | } |
| | | else{ |
| | | else{//小片标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getProcess())); |
| | |
| | | if (!flowCardList.isEmpty()) { |
| | | Set<String> processedProcessIds = new HashSet<>(); // 用来存放已处理过的 processId |
| | | |
| | | if (lableType != 2){ |
| | | if (lableType != 2){//成品标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | | String processId = flowCard.getProcessId(); |
| | | String orderNumber = flowCard.getOrderNumber().toString(); |
| | |
| | | processedProcessIds.add(orderNumber); |
| | | } |
| | | } |
| | | else{ |
| | | else{//小片标签 |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getProcess())); |
| | |
| | | } |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("composing")), FlowCard.class); |
| | | for (FlowCard flowCard : flowCardList) { |
| | | //查询是否报工 |
| | | Integer count = flowCardMapper.reportingWorkCount(flowCard.getProcessId()); |
| | | if (count == 0) { |
| | | //修改分架状态 |
| | |
| | | Set<String> processedProcessIds = new HashSet<>(); // 用来存放已处理过的 processId |
| | | for (FlowCard flowCard : flowCardList) { |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | if (detailType==0){ |
| | | //是否是工程明细打印 |
| | | if (detailType==0){//工程打印明细 |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProjectDetail(flowCard.getProjectNo(),flowCard.getStockId())); |
| | | |
| | | } |
| | | //非工程打印 |
| | | else if (detailType==1) { |
| | | itemmap.put("data", flowCardMapper.getPrintCustomDataProject(flowCard.getProjectNo())); |
| | | |
| | |
| | | List<ProductionScheduling> schedulinglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("scheduling")), ProductionScheduling.class); |
| | | if (!schedulinglist.isEmpty()) { |
| | | for (ProductionScheduling productionScheduling : schedulinglist) { |
| | | //查询已排产工序数量 |
| | | // Integer num = productionSchedulingMapper.selectNumberMp(productionScheduling.getOrderId(),productionScheduling.getOrderNumber(),processes); |
| | | |
| | | productionSchedulingMapper.insertSelective(schedulingId,productionScheduling.getOrderGlassDetail().getOrderId(),productionScheduling.getOrderNumber(),productionScheduling.getTechnologyNumber(),processes,productionScheduling.getSchedulingQuantity(),productionScheduling.getScheduledStartTime(),productionScheduling.getPlanEndTime(),productionScheduling.getNotes()); |
| | | // System.out.println(productionScheduling.getOrderId()+"***"+productionScheduling.getOrderGlassDetail().getOrderId()+"--"+productionScheduling.getOrderDetail().getOrderId()); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | if (!Scheduling.isEmpty()) { |
| | | for (ProductionScheduling productionScheduling : Scheduling) { |
| | | productionSchedulingMapper.deleteSchedulingMp(productionScheduling.getSchedulingId()); |
| | | // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId()); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | if (!schedulinglist.isEmpty()) { |
| | | for (ProductionScheduling productionScheduling : schedulinglist) { |
| | | productionSchedulingMapper.examineSchedulingMp(productionScheduling.getSchedulingId(),userName,productionScheduling.getSchedulingQuantity(),productionScheduling.getNotes()); |
| | | // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId()); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | if (!schedulinglist.isEmpty()) { |
| | | for (ProductionScheduling productionScheduling : schedulinglist) { |
| | | productionSchedulingMapper.cancelReviewSchedulingMp(productionScheduling.getSchedulingId()); |
| | | // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId()); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | if (lableType != 2){ |
| | | if (lableType != 2){//成品标签 |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getRepairPrintCustomData(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getReportingWorkId())); |
| | | list.add(itemmap); |
| | | } |
| | | else{ |
| | | else{//小片标签 |
| | | Map<String, Object> itemmap = new HashMap<>(); |
| | | itemmap.put("data", flowCardMapper.getRepairPrintCustomDataSemi(flowCard.getProcessId(),flowCard.getTechnologyNumber(),flowCard.getReportingWorkId())); |
| | | list.add(itemmap); |
| | |
| | | logService.saveLog(log); |
| | | } |
| | | } |
| | | |
| | | // } catch (Exception e) { |
| | | // TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | // //将异常传入数据库 |
| | | // SysError sysError = new SysError(); |
| | | // sysError.setError(e.toString()); |
| | | // sysError.setFunc("updateCancelReviewSv"); |
| | | // sysErrorService.insert(sysError); |
| | | // saveState = false; |
| | | // |
| | | // } |
| | | |
| | | return saveState; |
| | | } |
| | |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate", list); |
| | | // map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail)); |
| | | return map; |
| | | } |
| | | |
| | |
| | | } else if (optionVal.equals("3")) { |
| | | |
| | | } else { |
| | | |
| | | //没有选择分组 |
| | | map.put("data", reportMapper.workInProgressMp(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO)); |
| | | map.put("total", reportMapper.workInProgressTotal(offset, pageSize, orderId, inputProject, selectProcesses, workInProgressDTO)); |
| | | |
| | |
| | | } |
| | | |
| | | public List exportDamageReportSv(List<LocalDate> dates) { |
| | | |
| | | return reportMapper.exportDamageReportMp(dates); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public List exportWorkInProgressSv(Map<String, Object> dates) { |
| | | //List<LocalDate> date= (List<LocalDate>) dates.get("date"); |
| | | String process= (String) dates.get("processes"); |
| | | String inputVal= (String) dates.get("inputVal"); |
| | | String project= (String) dates.get("project"); |
| | |
| | | /*获取返工管理数据*/ |
| | | public Map<String,Object> reworkMangageData (Integer pageNum, Integer pageSize,String startTime,String endTime) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",reportingWorkDetailMapper.reworkDataManage(offset,pageSize,startTime,endTime)); |
| | | return map; |
| | |
| | | /*获取返工管理数据*/ |
| | | public Map<String,Object> reworkMangageData2 (Integer pageNum, Integer pageSize,String startTime,String endTime,ReportingWorkDetail reportingWorkDetail ) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",reportingWorkDetailMapper.reworkDataManage2(offset,pageSize,startTime,endTime, reportingWorkDetail)); |
| | | return map; |
| | |
| | | map.put("device", reportingWorkMapper.SelectWorkBasicDeviceMp(process)); |
| | | //班组下拉框 |
| | | map.put("teams", reportingWorkMapper.SelectWorkBasicTeamsMp(process)); |
| | | |
| | | //次破类型 |
| | | map.put("breakageType", reportingWorkMapper.selectBasicNameByType("breakagetype")); |
| | | //次破原因 |
| | | map.put("breakageReason", reportingWorkMapper.selectBasicNameByType("breakagereason")); |
| | | |
| | | //查询本工序报工需要哪几层,上工序是什么 |
| | |
| | | //不是第一道工序,查询报工数据 |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMp(processIdStr, technologyStr, process,previousProcess,laminating); |
| | | if(process.equals("中空")){ |
| | | String orderId = processIdStr.substring(0,10); |
| | | //获取该流程卡订单号 |
| | | String orderId = reportingWorkMapper.selectOrderid(processIdStr); |
| | | details.forEach( detail -> { |
| | | Integer glassId = orderGlassDetailMapper. |
| | | getMinIdByGroup(orderId, |
| | |
| | | //不是第一道工序,查询报工数据 |
| | | List<Map<String,String>> details = reportingWorkMapper.SelectReworlDetailMpReview(processIdStr, technologyStr, process,previousProcess,laminating); |
| | | if(process.equals("中空")){ |
| | | String orderId = processIdStr.substring(0,10); |
| | | String orderId = reportingWorkMapper.selectOrderid(processIdStr); |
| | | details.forEach( detail -> { |
| | | Integer glassId = orderGlassDetailMapper. |
| | | getMinIdByGroup(orderId, |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | map.put("Detail",details ); |
| | | } |
| | | } |
| | |
| | | //历史工序 |
| | | map.put("historyProcess", reportingWorkMapper.SelectHistoryProcessMp(historyProcess, process)); |
| | | } |
| | | |
| | | |
| | | return map; |
| | | } |
| | | |
| | |
| | | map.put("process", reportingWorkMapper.SelectProcessMp()); |
| | | } |
| | | else { |
| | | //对指定工序单独查询 |
| | | if (process.equals("夹胶")){ |
| | | map.put("process",reportingWorkMapper.getSelectProcessJiajiao() ); |
| | | } |
| | |
| | | reportingWork.setProcessId(processIdStr[0]); |
| | | |
| | | int reviewState = (int) reportingWorkJson.get("type"); |
| | | if (reviewState == 1) { |
| | | if (reviewState == 1) {//审核通过 |
| | | reportingWork.setReviewed(reportingWork.getCreator()); |
| | | reportingWork.setReviewedState(1); |
| | | } else { |
| | |
| | | reportingWorkMapper.insert(reportingWork); |
| | | //副表循环插入,并且插入次破信息表。再根据次破信息修改订单玻璃流程表的完工数量与刺破数量 |
| | | reportingWorkDetails.forEach(reportingWorkDetail -> { |
| | | // reportingWork.setThisProcessQuantity( |
| | | // reportingWork.getThisProcessQuantity() |
| | | // +reportingWorkDetail.getCompletedQuantity() |
| | | // +reportingWorkDetail.getBreakageQuantity()); |
| | | // reportingWork.setThisCompletedQuantity( |
| | | // reportingWork.getThisCompletedQuantity()+reportingWorkDetail.getCompletedQuantity()); |
| | | // reportingWork.setThisWornQuantity( |
| | | // reportingWork.getThisWornQuantity()+reportingWorkDetail.getBreakageQuantity()); |
| | | |
| | | int qualityInsStatus = (int) reportingWorkJson.get("qualityInsStatus"); |
| | | reportingWorkDetail.setReportingWorkId(reportingWorkId); |
| | |
| | | //根据订单id,订单序号,以及小片序号 更新小片流程的完工数量以及刺破数量 |
| | | LambdaUpdateWrapper<OrderProcessDetail> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.eq(OrderProcessDetail::getOrderNumber, reportingWorkDetail.getOrderNumber()) |
| | | .eq(OrderProcessDetail::getProcessId, reportingWork.getProcessId().substring(0, 14)) |
| | | .eq(OrderProcessDetail::getProcessId, reportingWork.getProcessId()) |
| | | .eq(OrderProcessDetail::getOrderId, reportingWork.getOrderId()) |
| | | .eq(OrderProcessDetail::getProcess, reportingWork.getThisProcess()) |
| | | .eq(OrderProcessDetail::getTechnologyNumber, reportingWorkDetail.getTechnologyNumber()) |
| | |
| | | .setSql("reporting_work_num =reporting_work_num +" + orderProcessDetail.getReportingWorkNum()) |
| | | .setSql("broken_num =broken_num +" + orderProcessDetail.getBrokenNum()); |
| | | orderProcessDetailMapper.update(null, updateWrapper); |
| | | |
| | | //判断完工数量和刺破数量是否为0,为0则不插入到数据库 |
| | | if (!(reportingWorkDetail.getCompletedQuantity() == 0 && reportingWorkDetail.getBreakageQuantity() == 0)) { |
| | | reportingWorkDetailMapper.insert(reportingWorkDetail); |
| | |
| | | int index = processId.lastIndexOf("/") + 1; |
| | | String result = processId.substring(index); |
| | | String technologyStr = reportingWork.get("technologyStr"); |
| | | |
| | | String[] processIdStr = processId.split("/"); |
| | | //合片工序 |
| | | if (thisProcess.equals("夹胶") || thisProcess.equals("中空") || thisProcess.equals("包装")){ |
| | | LambdaUpdateWrapper |
| | | <ReportingWork> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper |
| | | .eq(ReportingWork::getProcessId, processId.substring(0, 14)) |
| | | .eq(ReportingWork::getProcessId, processIdStr[0]) |
| | | .eq(ReportingWork::getThisProcess, reportingWork.get("process")) |
| | | .eq(ReportingWork::getReviewedState, 0) |
| | | .setSql("reviewed_state =1") |
| | | .set(ReportingWork::getReviewed, userName); |
| | | reportingWorkMapper.update(null, updateWrapper); |
| | | }else { |
| | | reportingWorkMapper.ReviewReportingWorkMp(processId.substring(0, 14),reportingWork.get("process"),technologyStr,userName); |
| | | reportingWorkMapper.ReviewReportingWorkMp(processIdStr[0],reportingWork.get("process"),technologyStr,userName); |
| | | |
| | | } |
| | | return true; |
| | |
| | | }); |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | //报工主表 |
| | | map.put("reportingWork", reportingWork); |
| | | //报工明细 |
| | | map.put("reportingWorkDetails", reportingWorkDetails); |
| | | //报工下拉框数据 |
| | | map.put("basic", getReportingWorkBase(reportingWork.getProcessId(), reportingWork.getThisProcess())); |
| | | //根据报工编号获取层 |
| | | map.put("layer", reportingWorkMapper.selectLayerByReportingWorkId(reportingWorkId)); |
| | |
| | | map.put("deviceType", reportingWorkMapper.SelectWorkBasicDeviceMp(thisProcess)); |
| | | //班组下拉框 |
| | | map.put("teamsType", reportingWorkMapper.SelectWorkBasicTeamsMp(thisProcess)); |
| | | |
| | | //次破类型 |
| | | map.put("breakageType", reportingWorkMapper.selectBasicNameByType("breakagetype")); |
| | | //次破原因 |
| | | map.put("breakageReason", reportingWorkMapper.selectBasicNameByType("breakagereason")); |
| | | |
| | | //获取该流程卡号历史报工工序 |
| | |
| | | .delete(new LambdaQueryWrapper<ReportingWorkDetail>() |
| | | .eq(ReportingWorkDetail::getReportingWorkId, reportingWork.getReportingWorkId())); |
| | | |
| | | //更细报工主表 |
| | | //更新报工主表 |
| | | int qualityInsStatus = (int) reportingWorkJson.get("qualityInsStatus"); |
| | | reportingWorkMapper.updateById(reportingWork); |
| | | reportingWorkDetails.forEach(reportingWorkDetail -> { |
| | |
| | | damageDetail.setProcessId(reportingWork.getProcessId()); |
| | | damageDetail.setOrderNumber(reportingWorkDetail.getOrderNumber()); |
| | | damageDetail.setTechnologyNumber(reportingWorkDetail.getTechnologyNumber()); |
| | | //是否修改质检状态 |
| | | if (!Objects.equals(reportingWork.getThisProcess(), damageDetail.getResponsibleProcess()) && qualityInsStatus==2) { |
| | | damageDetail.setQualityInsStatus(1); |
| | | } |
| | |
| | | //根据订单id,订单序号,以及小片序号 更新小片流程的完工数量以及刺破数量 |
| | | LambdaUpdateWrapper<OrderProcessDetail> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper.eq(OrderProcessDetail::getOrderNumber, reportingWorkDetail.getOrderNumber()) |
| | | .eq(OrderProcessDetail::getProcessId, reportingWork.getProcessId().substring(0, 14)) |
| | | .eq(OrderProcessDetail::getProcessId, reportingWork.getProcessId()) |
| | | .eq(OrderProcessDetail::getOrderId, reportingWork.getOrderId()) |
| | | .eq(OrderProcessDetail::getProcess, reportingWork.getThisProcess()) |
| | | .eq(OrderProcessDetail::getTechnologyNumber, reportingWorkDetail.getTechnologyNumber()) |
| | |
| | | //查询工单 |
| | | public Map<String, Object> defaultDateWork(Date selectTime1, Date selectTime2, Integer state, OrderGlassDetail orderGlassDetail) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if (state == 1) { |
| | | if (state == 1) {//已转工单 |
| | | map.put("data", workOrderMapper.selectWordOrder(selectTime1, selectTime2, orderGlassDetail)); |
| | | } else { |
| | | } else {//未转工单 |
| | | map.put("data", workOrderMapper.selectWordOrderNo(selectTime1, selectTime2, orderGlassDetail)); |
| | | } |
| | | |
| | |
| | | Integer noWorkCount = workOrderMapper.selectWorkCount(orderId); |
| | | //查询该订单转生产订单的条数 |
| | | Integer yesWorkCount = workOrderMapper.selectYesWorkCount(orderId); |
| | | if (noWorkCount.equals(yesWorkCount)) { |
| | | workOrderMapper.updateWorkType(orderId, state); |
| | | if (noWorkCount.equals(yesWorkCount)) {//判断订单是否全部转工单 |
| | | workOrderMapper.updateWorkType(orderId, state);//全部 |
| | | } else { |
| | | workOrderMapper.updateWorkType(orderId, states); |
| | | workOrderMapper.updateWorkType(orderId, states);//部分 |
| | | } |
| | | return true; |
| | | } |
| | |
| | | on o.order_id = od.order_id |
| | | where LENGTH(fc.process_id) = 14 |
| | | and odpd.process = #{selectProcesses} |
| | | and DATE_FORMAT((o.create_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2} |
| | | and rw.reporting_work_time >= #{selectTime1} |
| | | AND rw.reporting_work_time < #{selectTime2} |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | | and fc.quantity - odpd.reporting_work_num>0 |
| | |
| | | AND dd.technology_number = ogd.technology_number |
| | | left join sd.order_detail as od on o.order_id = od.order_id and od.order_number=ogd.order_number |
| | | WHERE |
| | | DATE_FORMAT((rw.reporting_work_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2} |
| | | rw.reporting_work_time >= #{selectTime1} |
| | | AND rw.reporting_work_time < #{selectTime2} |
| | | |
| | | AND dd.available = 0 |
| | | AND LENGTH( rw.process_id )= 14 |
| | | <if test="damageReportDTO.orderId != null and damageReportDTO.orderId != ''"> |
| | |
| | | AND dd.order_number = ogd.order_number |
| | | AND dd.technology_number = ogd.technology_number |
| | | WHERE |
| | | DATE_FORMAT((rw.reporting_work_time), '%Y-%m-%d') between #{selectTime1} and #{selectTime2} |
| | | rw.reporting_work_time >= #{selectTime1} |
| | | AND rw.reporting_work_time < #{selectTime2} |
| | | AND dd.available = 0 |
| | | AND LENGTH( rw.process_id )= 14 |
| | | <if test="damageReportDTO.orderId != null and damageReportDTO.orderId != ''"> |
| | |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | <if test="process == '夹胶' or (process == '打胶和粘框' and previousProcess=='夹胶')"> |
| | | <if test="process == '夹胶' or (process == '打胶和粘框')"> |
| | | AND ogd.`group` = (select `group` |
| | | from sd.order_glass_detail |
| | | where order_id = ogd.order_id |
| | |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | <if test="process == '夹胶' or (process == '打胶和粘框' and previousProcess=='夹胶')"> |
| | | <if test="process == '夹胶' or (process == '打胶和粘框')"> |
| | | AND ogd.`group` = (select `group` |
| | | from sd.order_glass_detail |
| | | where order_id = ogd.order_id |
| | |
| | | <select id="getProcessLaminating"> |
| | | select IFNULL(nickname,'') from sd.basic_data where basic_category='process' and basic_name=#{process} |
| | | </select> |
| | | |
| | | <select id="selectOrderid"> |
| | | select order_id from pp.flow_card where process_id=#{processIdStr} group by order_id |
| | | </select> |
| | | </mapper> |