| | |
| | | import com.example.erp.mapper.pp.FlowCardMapper; |
| | | import com.example.erp.mapper.sd.OrderGlassDetailMapper; |
| | | import com.example.erp.mapper.sd.OrderProcessDetailMapper; |
| | | import com.fasterxml.jackson.databind.JsonNode; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import jdk.nashorn.internal.parser.JSONParser; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | |
| | | |
| | | import java.io.StringReader; |
| | | import java.sql.Date; |
| | | import java.util.*; |
| | | |
| | |
| | | public Object selectPrintSv(String orderId, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectPrintMp(orderId, flowCard)); |
| | | map.put("type", flowCardMapper.selectType()); |
| | | return map; |
| | | } |
| | | |
| | |
| | | Integer count=flowCard.getQuantity(); |
| | | for (int i = 0; i < count; i++) { |
| | | map.put("data", flowCardMapper.getPrintLabel(flowCard.getProcessId(), flowCard.getTechnologyNumber())); |
| | | //System.out.println(flowCardMapper.getPrintLabel(flowCard.getProcessId(), flowCard.getTechnologyNumber())); |
| | | System.out.println(flowCardMapper.getPrintLabel(flowCard.getProcessId(), flowCard.getTechnologyNumber())); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | public Map<String, Object> getSelectPrintCustomLabelSv(String type, Map<String, Object> object) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();//最终结果 |
| | | List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class); |
| | | if (!flowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : flowCardList) { |
| | | map.put("data", flowCardMapper.getPrintCustomData(flowCard.getOrderId(),flowCard.getOrderNumber())); |
| | | map.put("quantity", flowCard.getQuantity()); |
| | | } |
| | | } |
| | | |
| | | map.put("title", flowCardMapper.getPrintTitle(type)); |
| | | return map; |
| | | } |
| | | |
| | | public Object getCustomLabelDetailSv(String name, String form, String id, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.getCustomLabelDetailMp(name, form,id, flowCard)); |
| | | return map; |
| | | } |
| | | |
| | | } |
| | | |
| | | |