Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | deleteSuccess:'删除成功', |
| | | deleteFail:'删除失败', |
| | | cancelReviewFail:'反审失败', |
| | | cancelReviewFailWork:'反审失败,请检查是否报工', |
| | | reviewFail:'审核失败', |
| | | noProductDataInTheTable:'表格中无产品数据', |
| | | tableDataExceedsMaximumLimit:'表格数据超过最大限制', |
| | |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | |
| | | { |
| | | 'name': t('basicData.delete'),status: 'primary', |
| | | 'code':'delete' |
| | | }, |
| | | { |
| | | 'name': t('basicData.cancelReview'),status: 'primary', |
| | | 'code':'cancelReview' |
| | | } |
| | | ], |
| | | /*import: false, |
| | |
| | | |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.deleteFail')) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | return |
| | | |
| | | } |
| | | case 'cancelReview': { |
| | | const $table = xGrid.value |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | let flowData = ref({ |
| | | |
| | | userId:userid, |
| | | userName:username, |
| | | patchLog:selectRecords |
| | | |
| | | }) |
| | | request.post("/Replenish/updateCancelReview",flowData.value).then((res) => { |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('basicData.msg.cancelReviewSuccess')) |
| | | router.push({path:'/main/Replenish/SelectReplenish',query:{random:Math.random()}}) |
| | | |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.cancelReviewFailWork')) |
| | | } |
| | | }) |
| | | } |
| | |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | :checkbox-config="checkBoxConfig" |
| | | |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- :checkbox-config="checkBoxConfig" @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | |
| | | |
| | | }) |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | console.log(produceList) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | {field: 'totalThickness', title: t('processCard.totalThickness'), width: '80px'}, |
| | | {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: 'remarks', title: t('processCard.notes'), width: '85px',filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod: filterChanged}, |
| | | {field: 'bend_radius', title: t('order.bendRadius'), width: '110px',filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod: filterChanged} |
| | | |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | if(user.user.address!==null && user.user.address!==''){ |
| | | titleUploadData.value.thisProcess = user.user.address |
| | | titleUploadData.value.teamsGroupsName = user.user.userName |
| | | if (user.user.address!=='技术部多曲'){ |
| | | console.log(user.user.address) |
| | | groupChangeProcess.value = true |
| | | if (user.user.address==='技术部多曲' || user.user.address==='夹胶'){ |
| | | groupChangeProcess.value = false |
| | | } |
| | | gridOptions.toolbarConfig.buttons[1].visible=false |
| | | } |
| | |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start ){ |
| | | let newStr = subStr1.replace(reg, number); |
| | | if(parseInt(newStr)>9){ |
| | | newStr=parseInt(newStr) |
| | | } |
| | | setNestedValue(item,result.cell,subStr2+newStr) |
| | | number=number+1 |
| | | } |
| | |
| | | dataList.forEach((item,index) =>{ |
| | | if(index >= result.start && index <= result.end){ |
| | | let newStr = subStr1.replace(reg, number); |
| | | if(parseInt(newStr)>9){ |
| | | newStr=parseInt(newStr) |
| | | } |
| | | setNestedValue(item,result.cell,subStr2+newStr) |
| | | number=number+1 |
| | | } |
| | |
| | | public Result deleteReplenish( @RequestBody Map<String,Object> object){ |
| | | return Result.seccess(replenishService.deleteReplenishSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("补片反审接口") |
| | | @SaCheckPermission("SelectReplenish.countertrial") |
| | | @PostMapping("/updateCancelReview") |
| | | public Result updateCancelReview( @RequestBody Map<String,Object> object){ |
| | | return Result.seccess(replenishService.updateCancelReviewSv(object)); |
| | | } |
| | | } |
| | |
| | | Boolean updatePatchBgMp(String reportingWorkId, String orderSort, Integer technologyNumber); |
| | | |
| | | |
| | | Boolean updateOrderProcessDetailCancel(@Param("patchLog") PatchLog patchLog,@Param("reportingWork") ReportingWork reportingWork); |
| | | |
| | | Boolean updateReplenishCancel(@Param("patchLog") PatchLog patchLog); |
| | | } |
| | | |
| | |
| | | Boolean ReviewReportingWorkMp(String substring, String process, String result, String userName); |
| | | |
| | | String getPatchConditionMp(String reportingWorkId); |
| | | |
| | | Integer getFirstStep(String processId, String orderSort, Integer technologyNumber, String interceptProcess); |
| | | } |
| | |
| | | List<PatchLog> patchLoglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("patchLog")), PatchLog.class); |
| | | if (!patchLoglist.isEmpty()){ |
| | | for (PatchLog patchLog : patchLoglist) { |
| | | PatchLog patchLog1=patchMapper.selectOne(new QueryWrapper<PatchLog>().eq("id",patchLog.getId())); |
| | | //判断是否已经审核 |
| | | if(patchLog1.getReviewStatus()==0){ |
| | | //删除补片表对应补片id数据 |
| | | patchMapper.deleteReplenishMp(patchLog.getPatchId()); |
| | | //修改次破明细表补片数量和状态 |
| | |
| | | //修改报工明细表状态 |
| | | patchMapper.updatePatchBgMp(patchLog.getReportingWorkId(),patchLog.getOrderSort(),patchLog.getTechnologyNumber()); |
| | | |
| | | } |
| | | else{ |
| | | saveState = false; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | return saveState; |
| | | } |
| | | |
| | | public Boolean updateCancelReviewSv(Map<String, Object> object) { |
| | | boolean saveState = true; |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | //try { |
| | | String userName = ""; |
| | | String userId = ""; |
| | | if (object.get("userName") != null) { |
| | | userName = object.get("userName").toString(); |
| | | } |
| | | if (object.get("userId") != null) { |
| | | userId = object.get("userId").toString(); |
| | | } |
| | | //获取对象集合循环进行新增修改 |
| | | List<PatchLog> patchLoglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("patchLog")), PatchLog.class); |
| | | if (!patchLoglist.isEmpty()){ |
| | | for (PatchLog patchLog : patchLoglist) { |
| | | //查询流程卡工艺流程 |
| | | String technologicalProcess = reportingWorkMapper.SelectTechnologicalProcess(patchLog.getProcessId(), String.valueOf(patchLog.getTechnologyNumber())); |
| | | if (technologicalProcess!=null || !technologicalProcess.equals("")) { |
| | | String[] processList = technologicalProcess.split("->"); |
| | | //获取工艺流程第一个工序 |
| | | String interceptProcess = processList[0]; |
| | | Integer firstStep=reportingWorkMapper.getFirstStep(patchLog.getProcessId(),patchLog.getOrderSort(),patchLog.getTechnologyNumber(),interceptProcess); |
| | | if (firstStep>=patchLog.getPatchNum()){ |
| | | ReportingWork reportingWork = reportingWorkMapper |
| | | .selectOne(new QueryWrapper<ReportingWork>().eq("reporting_work_id",patchLog.getReportingWorkId())); |
| | | //修改小片流程卡数量 |
| | | patchMapper.updateOrderProcessDetailCancel(patchLog,reportingWork); |
| | | //审核 |
| | | patchMapper.updateReplenishCancel(patchLog); |
| | | } |
| | | else { |
| | | saveState = false; |
| | | } |
| | | }else{ |
| | | saveState = false; |
| | | } |
| | | |
| | | Log log = new Log(); |
| | | log.setContent(object.toString()); |
| | | log.setFunction("updateCancelReviewSv补片反审"); |
| | | log.setOperatorId((String) object.get("userId")); |
| | | log.setOperator((String) object.get("userName")); |
| | | 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; |
| | | } |
| | | } |
| | | |
| | |
| | | .eq(ReportingWork::getProcessId, processId.substring(0, 14)) |
| | | .eq(ReportingWork::getThisProcess, reportingWork.get("process")) |
| | | .eq(ReportingWork::getReviewedState, 0) |
| | | .eq(ReportingWork::getReviewed, userName) |
| | | .setSql("reviewed_state =1"); |
| | | .setSql("reviewed_state =1") |
| | | .set(ReportingWork::getReviewed, userName); |
| | | reportingWorkMapper.update(null, updateWrapper); |
| | | }else { |
| | | reportingWorkMapper.ReviewReportingWorkMp(processId.substring(0, 14),reportingWork.get("process"),technologyStr,userName); |
| | |
| | | p.thickness, |
| | | od.weight, |
| | | od.remarks, |
| | | od.bend_radius, |
| | | ods.S01, |
| | | ods.S02, |
| | | ods.S03, |
| | |
| | | where reporting_work_id=#{reportingWorkId} and order_number=#{orderSort} and technology_number=#{technologyNumber} |
| | | </update> |
| | | |
| | | <update id="updateOrderProcessDetailCancel"> |
| | | update sd.order_process_detail |
| | | set reporting_work_num=reporting_work_num + #{patchLog.patchNum} |
| | | where order_id = #{patchLog.orderId} |
| | | and process_id = #{patchLog.processId} |
| | | and order_number = #{patchLog.orderSort} |
| | | and technology_number = #{patchLog.technologyNumber} |
| | | and id <![CDATA[<]]> (select a.opdid |
| | | from (select id as opdid |
| | | from sd.order_process_detail opd |
| | | where opd.order_id = #{patchLog.orderId} |
| | | and opd.process_id = #{patchLog.processId} |
| | | and opd.order_number = #{patchLog.orderSort} |
| | | and opd.technology_number = #{patchLog.technologyNumber} |
| | | and process = #{reportingWork.thisProcess}) as a) |
| | | </update> |
| | | |
| | | <update id="updateReplenishCancel"> |
| | | update pp.patch_log set reviewer=null,review_status=0,update_time=now() where id=#{patchLog.id} |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <select id="getPatchConditionMp"> |
| | | select count(*) from damage_details where reporting_work_id=#{reportingWorkId} and patch_status>0 |
| | | </select> |
| | | |
| | | <select id="getFirstStep"> |
| | | SELECT |
| | | |
| | | fc.quantity -odpd.reporting_work_num -odpd.broken_num + ifnull(patch.patch_num,0) as quantity |
| | | FROM |
| | | sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | LEFT JOIN flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | | and fc.production_id=ogd.production_id |
| | | AND fc.order_number = ogd.order_number |
| | | AND fc.technology_number = ogd.technology_number |
| | | left join sd.order_process_detail as odpd |
| | | ON odpd.order_id = fc.order_id |
| | | AND odpd.order_number = fc.order_number |
| | | AND odpd.technology_number = fc.technology_number |
| | | and odpd.process_id = fc.process_id |
| | | left join ( |
| | | select ifnull(sum(a.patch_num),0) as patch_num,a.process_id,a.technology_number,a.order_sort |
| | | from patch_log as a |
| | | right join reporting_work |
| | | on a.reporting_work_id=reporting_work.reporting_work_id |
| | | where |
| | | reporting_work.this_process = #{interceptProcess} |
| | | and a.process_id=#{processId} |
| | | and a.order_sort=#{orderSort} |
| | | and POSITION(a.technology_number in #{technologyNumber}) |
| | | and a.review_status = 1 |
| | | group by a.process_id,a.order_sort,a.technology_number |
| | | ) as patch |
| | | on patch.process_id = fc.process_id |
| | | and patch.order_sort = fc.order_number |
| | | and patch.technology_number = fc.technology_number |
| | | left join sd.`order` as o on o.order_id=od.order_id |
| | | |
| | | WHERE |
| | | fc.process_id = #{processId} |
| | | and fc.order_number=#{orderSort} |
| | | AND POSITION(fc.technology_number in #{technologyNumber}) |
| | | AND odpd.process = #{interceptProcess} |
| | | group by fc.order_number, |
| | | ogd.technology_number |
| | | order by fc.order_number |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | where date(d.create_time) >= #{startDate} |
| | | and date(d.create_time) <= #{endDate} |
| | | and d.customer_id = 1855 |
| | | and d.customer_id = #{orderDetail.order.customerId} |
| | | and om.money is not null |
| | | group by d.delivery_id, o.order_id, om.`column` |
| | | </select> |