| | |
| | | RawInspectVo rawInspectVo = new RawInspectVo(); |
| | | List<Map<String, Object>> mapList = SyncOrder.ifsInterfaces(); |
| | | for (Map<String, Object> map : mapList) { |
| | | //todo: 后续需要将状态改成待检验 |
| | | if (map.get("STATE").equals("已接收")) { |
| | | if (map.get("PART_NO").toString().equals(code)) { |
| | | rawInspectVo.setCode(map.get("PART_NO").toString()); //原材料编码 |
| | |
| | | //更新检验状态(上报) |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public String updateRawInspectsById(Integer id) { |
| | | public String updateRawInspectsById(Integer id,Integer number) { |
| | | /*更新检验单里面的检验结论*/ |
| | | //先判断检验结果 |
| | | List<Integer> results = rawInsProductMapper.getresult(id); |
| | |
| | | if (rawInspect.getJudgeState() == 0) { |
| | | InspectUnaccepted rawUnaccepted = InspectUnaccepted.builder() |
| | | .reason(rawInspectMapper.selectById(id).getName() + "不合格") //暂且定义为原材料不合格 |
| | | .number(number) |
| | | .rawInspectId(id) |
| | | .type(0) //类型为原材料 |
| | | .build(); |
| | | inspectUnacceptedMapper.insert(rawUnaccepted); |
| | | } |
| | | /*检验完成后,无论合格与否,将IFS报检状态更改为已接收*/ |
| | | |
| | | return rawInspect.getJudgeState().toString(); |
| | | } |
| | | |