chenlu
2024-06-07 2f640b1038fa331954f78ed1f4317212cf5bb34d
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -6,6 +6,7 @@
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.erp.entity.pp.FlowCard;
import com.example.erp.entity.pp.ProductionScheduling;
import com.example.erp.entity.sd.OrderGlassDetail;
import com.example.erp.entity.sd.OrderProcessDetail;
import com.example.erp.mapper.pp.FlowCardMapper;
@@ -235,4 +236,34 @@
        map.put("data", list);
        return map;
    }
    public Boolean updateComposingSv(Map<String, Object> object) {
        List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("composing")), FlowCard.class);
        if (!flowCardList.isEmpty()) {
            for (FlowCard flowCard : flowCardList) {
                flowCardMapper.updateComposing(flowCard.getProcessId());
            }
            return true;
        }
        else {
            return false;
        }
    }
    public Map<String, Object> getSelectPrintLabelSv(Map<String, Object> object) {
        Map<String, Object> map = new HashMap<>();
        List<FlowCard> flowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("printList")), FlowCard.class);
        if (!flowCardList.isEmpty()) {
            for (FlowCard flowCard : flowCardList) {
                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()));
                }
            }
        }
        return map;
    }
}