| | |
| | | @PostMapping("/inspectionReport") |
| | | public Result<?> inspectionReport(@RequestBody Map<String, Object> param) { |
| | | List<Long> ids = (List<Long>) param.get("ids"); |
| | | String orderType = Objects.nonNull(param.get("ids"))?param.get("ids").toString():""; |
| | | String orderType = Objects.nonNull(param.get("orderType"))?param.get("orderType").toString():""; |
| | | if(!OrderType.validateValue(orderType)){ |
| | | throw new ErrorException("批量报检失败,非法的销售订单分类枚举"); |
| | | } |
| | |
| | | batchInfoMap.put("PART_NO",ifsPartPropsRecord.getPartNo());//零件号 |
| | | batchInfoMap.put("LOT_BATCH_NO",ifsPartPropsRecord.getLotBatchNo());//批次号 |
| | | batchInfoMap.put("ATTR1",ifsPartPropsRecord.getDrumNo());//载具编号 |
| | | batchInfoMap.put("ATTR2",ifsPartPropsRecord.getStartMeterMark());//起始米标 |
| | | batchInfoMap.put("ATTR3",ifsPartPropsRecord.getEndMeterMark());//截止米标 |
| | | batchInfoMap.put("ATTR4", ifsPartPropsRecord.getInsulationColor());//绝缘颜色 |
| | | batchInfoMap.put("ATTR5",ifsPartPropsRecord.getOuterColor());//外护颜色 |
| | | batchInfoMap.put("ATTR2",ifsPartPropsRecord.getStartMeterMark().toString());//起始米标 |
| | | batchInfoMap.put("ATTR3",ifsPartPropsRecord.getEndMeterMark().toString());//截止米标 |
| | | batchInfoMap.put("ATTR4", ifsPartPropsRecord.getOuterColor());//外护颜色 |
| | | batchInfoMap.put("ATTR5",ifsPartPropsRecord.getInsulationColor());//绝缘颜色 |
| | | batchInfoMap.put("ATTR8",ifsPartPropsRecord.getLetteringInfo());//印字信息 |
| | | batchInfoMap.put("ATTR23","车间订单");//入库来源 |
| | | batchInfoMap.put("ATTR24","0");//分割预留数量 |
| | | batchInfoMap.put("ACTION_TYPE",actionType);//操作类型 |
| | | inAttrMap.put("BATCH_INFO", Collections.singletonList(batchInfoMap)); |
| | | Result result = ifsApiUtils.importPartLotAttr(JSONUtil.toJsonStr(inAttrMap)); |
| | |
| | | Integer isCheck = insOrderPlanDTO.getIsCheck(); |
| | | insOrderPlanDTO.setIsCheck(null); |
| | | String sonLaboratory = insOrderPlanDTO.getSonLaboratory();//试验室 |
| | | QueryWrapper<InsOrderPlanDTO> queryWrapper = QueryWrappers.queryWrappers(insOrderPlanDTO); |
| | | if(ObjectUtils.isEmpty(insOrderPlanDTO.getTypeSource())){ |
| | | queryWrapper.isNull("ifs_inventory_id");//委托试验查询非ifs报检订单 |
| | | }else{ |
| | | queryWrapper.isNotNull("ifs_inventory_id"); |
| | | Integer typeSource = insOrderPlanDTO.getTypeSource(); |
| | | QueryWrapper<InsOrderPlanDTO> queryWrapper = new QueryWrapper<>(); |
| | | if(ObjectUtils.isNotEmpty(typeSource)){ |
| | | insOrderPlanDTO.setTypeSource(null); |
| | | queryWrapper = QueryWrappers.queryWrappers(insOrderPlanDTO) |
| | | .eq(!Objects.equals(-1,typeSource),"type_source",typeSource) |
| | | .isNotNull(!Objects.equals(-1,typeSource),"ifs_inventory_id") |
| | | .isNull(Objects.equals(-1,typeSource),"ifs_inventory_id");//委托试验查询非ifs报检订单 |
| | | } |
| | | IPage<InsOrderPlanVO> insOrderPage = insSampleMapper.findInsSampleAndOrder(page, |
| | | queryWrapper, |
| | |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * ifs订单vo |
| | |
| | | @Data |
| | | public class IfsOrderVO extends InsOrder implements Serializable { |
| | | |
| | | |
| | | /** |
| | | * 零件批次属性主键id |
| | | */ |
| | | @ApiModelProperty("零件批次属性主键id") |
| | | private Long lotPartId; |
| | | |
| | | /** |
| | | * 绝缘颜色 |
| | |
| | | private String drumNo; |
| | | |
| | | /** |
| | | * 印字信息 |
| | | */ |
| | | @ApiModelProperty("印字信息") |
| | | private String letteringInfo; |
| | | |
| | | /** |
| | | * 起始米标 |
| | | */ |
| | | @ApiModelProperty("起始米标") |
| | | private BigDecimal startMeterMark; |
| | | |
| | | /** |
| | | * 截止米标 |
| | | */ |
| | | @ApiModelProperty("截止米标") |
| | | private BigDecimal endMeterMark; |
| | | |
| | | /** |
| | | * 是否是拆分订单(0:否 1:是) |
| | | */ |
| | | @ApiModelProperty("是否是拆分订单(0:否 1:是)") |
| | |
| | | </select> |
| | | <select id="selectOrderInfoById" resultType="com.ruoyi.inspect.vo.IfsOrderVO"> |
| | | select io.*, |
| | | isor.insulation_color, |
| | | isor.outer_color, |
| | | isor.drum_no, |
| | | iiq.is_split_order, |
| | | iiq.order_type AS ifs_order_type, |
| | | iiq.part_no, |
| | | iiq.update_batch_no AS lot_batch_no |
| | | iiq.update_batch_no AS lot_batch_no, |
| | | ipps.id AS lot_part_id, |
| | | case |
| | | when ipps.drum_no is not null and ipps.drum_no!='' then ipps.drum_no |
| | | else isor.drum_no |
| | | end AS drum_no, |
| | | case |
| | | when ipps.insulation_color is not null and ipps.insulation_color!='' then ipps.insulation_color |
| | | else isor.insulation_color |
| | | end AS insulation_color, |
| | | case |
| | | when ipps.outer_color is not null and ipps.outer_color!='' then ipps.outer_color |
| | | else isor.outer_color |
| | | end AS outer_color, |
| | | case |
| | | when ipps.lettering_info is not null and ipps.lettering_info!='' then ipps.lettering_info |
| | | else isor.lettering_info |
| | | end AS lettering_info, |
| | | ipps.start_meter_mark, |
| | | ipps.end_meter_mark |
| | | from ins_order io left join ifs_inventory_quantity iiq on io.ifs_inventory_id=iiq.id |
| | | left join ifs_split_order_record isor |
| | | on iiq.order_no=isor.order_no |
| | |
| | | and iiq.receipt_no=isor.receipt_no |
| | | and iiq.part_no=isor.part_no |
| | | AND iiq.update_batch_no = isor.lot_batch_no |
| | | LEFT JOIN ifs_part_props_record ipps ON iiq.id = ipps.ifs_inventory_id |
| | | where io.state !=-1 |
| | | AND io.id = #{id} |
| | | LIMIT 1 |