| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.mapper.pp.FlowCardMapper; |
| | | import com.example.erp.mapper.sd.OrderGlassDetailMapper; |
| | | import com.example.erp.mapper.sd.OrderProcessDetailMapper; |
| | |
| | | |
| | | |
| | | } |
| | | |
| | | public List<FlowCard> getProcessCard(Map<String, String> processCards) { |
| | | String processCard = processCards.get("processCard"); |
| | | if(!processCard.contains("/")){ |
| | | throw new ServiceException(Constants.Code_600, "错误的流程卡号,请检查!"); |
| | | } |
| | | |
| | | String[] processCardList = processCard.split("/"); |
| | | |
| | | List<FlowCard> flowCardList = flowCardMapper.selectList( |
| | | new QueryWrapper<FlowCard>() |
| | | .eq("process_id", processCardList[0]) |
| | | .eq("technology_number", processCardList[1]) |
| | | ); |
| | | for (FlowCard flowCard : flowCardList) { |
| | | flowCard.setOrderGlassDetail( |
| | | orderGlassDetailMapper.selectOne( |
| | | new QueryWrapper<OrderGlassDetail>() |
| | | .eq("order_id", flowCard.getOrderId()) |
| | | .eq("order_number", flowCard.getOrderNumber()) |
| | | .eq("technology_number", flowCard.getTechnologyNumber()) |
| | | ) |
| | | ); |
| | | String str = flowCard.getOrderGlassDetail().getGlassChild(); |
| | | String delimiter = "mm"; |
| | | int index = str.indexOf(delimiter); |
| | | Integer subString = Integer.valueOf(str.substring(0, index).trim()); |
| | | flowCard.getOrderGlassDetail().setThickness(subString); |
| | | } |
| | | return flowCardList; |
| | | } |
| | | |
| | | } |
| | | |
| | | |