| | |
| | | public Map<String, Object> SelectProcessSv(String userId) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | String process = reportingWorkMapper.selectUserProcess(userId); |
| | | //工序列表 |
| | | List<Map<String, Object>> processNameList = flowCardMapper.getProcessNameList(); |
| | | if (process==null) { |
| | | map.put("process", reportingWorkMapper.SelectProcessMp()); |
| | | } |
| | |
| | | map.put("process",reportingWorkMapper.getSelectProcessDuoqu() ); |
| | | } |
| | | } |
| | | |
| | | map.put("processNameList", processNameList); |
| | | return map; |
| | | } |
| | | |
| | |
| | | //是否线补 1现补 0未现补 |
| | | int isPatch = (reportingWorkJson.get("isPatch") != null) ? (int) reportingWorkJson.get("isPatch") : 0; |
| | | |
| | | reportingWork.setNextProcess(orderProcessDetailMapper.selectNextProcess(processIdStr[0],processIdStr[1],reportingWork.getThisProcess())); |
| | | //主表插入 |
| | | reportingWorkMapper.insert(reportingWork); |
| | | //副表循环插入,并且插入次破信息表。再根据次破信息修改订单玻璃流程表的完工数量与刺破数量 |
| | |
| | | int qualityInsStatus = (int) reportingWorkJson.get("qualityInsStatus"); |
| | | reportingWorkDetail.setReportingWorkId(reportingWorkId); |
| | | List<DamageDetails> damageDetails = reportingWorkDetail.getDamageDetails(); |
| | | reportingWork.setNextProcess(orderProcessDetailMapper.selectNextProcess(processIdStr[0],processIdStr[1],reportingWork.getThisProcess(),reportingWorkDetail.getOrderNumber())); |
| | | |
| | | //次破明细表插入数据 |
| | | if (damageDetails != null && !damageDetails.isEmpty()) { |
| | | damageDetails.forEach(damageDetail -> { |
| | |
| | | } |
| | | |
| | | //更新流程卡表的报工数量 |
| | | if (Objects.equals(reportingWork.getNextProcess(), "")|| Objects.equals(reportingWork.getNextProcess(), null)) { |
| | | if (reportingWork.getNextProcess() == null || reportingWork.getNextProcess().isEmpty()) { |
| | | LambdaUpdateWrapper<FlowCard> flowCardLambdaUpdateWrapper = |
| | | new LambdaUpdateWrapper<>(); |
| | | flowCardLambdaUpdateWrapper |
| | |
| | | //获取报工工序是否为复合工程 |
| | | String laminating = reportingWorkMapper.getProcessLaminating(thisProcess); |
| | | //合片工序 |
| | | if (laminating.equals("stepA") || laminating.equals("stepB")){ |
| | | if (laminating.indexOf("step")!=-1){ |
| | | LambdaUpdateWrapper |
| | | <ReportingWork> updateWrapper = new LambdaUpdateWrapper<>(); |
| | | updateWrapper |
| | |
| | | Map<String, Object> result = new HashMap<>(); |
| | | BasicData basicData = basicDataMapper |
| | | .selectOne(new QueryWrapper<BasicData>().eq("basic_name", reportingWork.get("process"))); |
| | | result.put("data",orderProcessDetailMapper.selectShiftQuantitySv(creatorId, startDate, endDate,basicData.getNickname())); |
| | | result.put("data",orderProcessDetailMapper.selectShiftQuantitySv(creatorId, startDate, endDate,basicData==null?null:basicData.getNickname())); |
| | | result.put("date",date); |
| | | return result; |
| | | } |