New file |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.example.erp.dto.otherSystem.GlassDetailList; |
| | | import com.example.erp.dto.otherSystem.OptimizeProject; |
| | | import com.example.erp.mapper.pp.OptimizeDetailMapper; |
| | | import com.example.erp.mapper.pp.OptimizeLayoutMapper; |
| | | import com.example.erp.mapper.pp.OptimizeProjectMapper; |
| | | import com.example.erp.mapper.pp.OtherFlowCardMapper; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | @RequiredArgsConstructor |
| | | @Service |
| | | public class OtherSystemInfoService { |
| | | private final OptimizeProjectMapper optimizeProjectMapper; |
| | | private final OptimizeDetailMapper optimizeDetailMapper; |
| | | private final OptimizeLayoutMapper optimizeLayoutMapper; |
| | | private final OtherFlowCardMapper otherFlowCardMapper; |
| | | |
| | | @Transactional |
| | | public Object saveGlassInfo(OptimizeProject glassInfo) { |
| | | optimizeProjectMapper.insert(glassInfo); |
| | | for (GlassDetailList glassDetailList : glassInfo.getGlassDetailList()) { |
| | | optimizeDetailMapper.insert(glassDetailList); |
| | | } |
| | | |
| | | glassInfo.getFlowCardList().forEach(flowCard -> { |
| | | otherFlowCardMapper.insert(flowCard); |
| | | }); |
| | | |
| | | glassInfo.getUpPattenList().forEach(upPatten -> { |
| | | optimizeLayoutMapper.insert(upPatten); |
| | | }); |
| | | |
| | | return true; |
| | | |
| | | } |
| | | } |