| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.whyc.dto.WorksheetMainDTO; |
| | | import com.whyc.mapper.DocUserMapper; |
| | | import com.whyc.mapper.WorksheetLinkMapper; |
| | | import com.whyc.mapper.WorksheetMainMapper; |
| | | import com.whyc.pojo.DocUser; |
| | | import com.whyc.pojo.ProductBomApproving; |
| | | import com.whyc.pojo.WorksheetLink; |
| | | import com.whyc.pojo.WorksheetMain; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import sun.print.PSPrinterJob; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | |
| | | @Resource |
| | | private DocUserMapper userMapper; |
| | | |
| | | @Autowired |
| | | private ProductBomApprovingService approvingService; |
| | | |
| | | @Transactional |
| | | public boolean submit(WorksheetMain main, DocUser user) { |
| | | public boolean submit(WorksheetMainDTO mainDTO, DocUser user) { |
| | | WorksheetMain main = mainDTO.getMain(); |
| | | List<ProductBomApproving> bomList = mainDTO.getBomList(); |
| | | //提交主表 |
| | | main.setCreateUserId(user.getId()); |
| | | //提交人角色来判断工作流层级 |
| | |
| | | }else{ |
| | | return false; |
| | | } |
| | | //产品bom/图纸图片提交 |
| | | bomList.forEach(bom->bom.setMainId(main.getId())); |
| | | approvingService.insert(bomList); |
| | | return true; |
| | | } |
| | | |