| | |
| | | import com.ruoyi.system.dto.TestMethodConfirmSheetSignDTO; |
| | | import com.ruoyi.system.mapper.SysUserMapper; |
| | | import com.ruoyi.system.model.TTestMethodConfirmSheet; |
| | | import com.ruoyi.system.model.TTestMethodConfirmSheetOriginal; |
| | | import com.ruoyi.system.model.TTestMethodConfirmSheetTerm; |
| | | import com.ruoyi.system.query.TTestMethodConfirmSheetQuery; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import com.ruoyi.system.service.TTestMethodConfirmSheetOriginalService; |
| | | import com.ruoyi.system.service.TTestMethodConfirmSheetService; |
| | | import com.ruoyi.system.service.TTestMethodConfirmSheetTermService; |
| | | import com.ruoyi.system.vo.TTestMethodConfirmSheetVO; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private final ISysUserService sysUserService; |
| | | private final SysUserMapper sysUserMapper; |
| | | private final TTestMethodConfirmSheetTermService testMethodConfirmSheetTermService; |
| | | private final TTestMethodConfirmSheetOriginalService testMethodConfirmSheetOriginalService; |
| | | @Autowired |
| | | public TTestMethodConfirmSheetController(TTestMethodConfirmSheetService testMethodConfirmSheetService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TTestMethodConfirmSheetTermService testMethodConfirmSheetTermService) { |
| | | public TTestMethodConfirmSheetController(TTestMethodConfirmSheetService testMethodConfirmSheetService, TokenService tokenService, ISysUserService sysUserService, SysUserMapper sysUserMapper, TTestMethodConfirmSheetTermService testMethodConfirmSheetTermService, TTestMethodConfirmSheetOriginalService testMethodConfirmSheetOriginalService) { |
| | | this.testMethodConfirmSheetService = testMethodConfirmSheetService; |
| | | this.tokenService = tokenService; |
| | | this.sysUserService = sysUserService; |
| | | this.sysUserMapper = sysUserMapper; |
| | | this.testMethodConfirmSheetTermService = testMethodConfirmSheetTermService; |
| | | this.testMethodConfirmSheetOriginalService = testMethodConfirmSheetOriginalService; |
| | | } |
| | | |
| | | /** |
| | |
| | | testMethodConfirmSheetTerm.setStatus(1); |
| | | }); |
| | | testMethodConfirmSheetTermService.saveBatch(testMethodConfirmSheetTerms); |
| | | List<TTestMethodConfirmSheetOriginal> testMethodConfirmSheetOriginals = new ArrayList<>(); |
| | | for (TTestMethodConfirmSheetTerm testMethodConfirmSheetTerm : testMethodConfirmSheetTerms) { |
| | | // 添加原始记录 |
| | | TTestMethodConfirmSheetOriginal testMethodConfirmSheetOriginal = new TTestMethodConfirmSheetOriginal(); |
| | | testMethodConfirmSheetOriginal.setTermId(testMethodConfirmSheetTerm.getId()); |
| | | // TODO 生成原始记录编号 |
| | | testMethodConfirmSheetOriginal.setOriginalCode(""); |
| | | testMethodConfirmSheetOriginal.setStatus(1); |
| | | testMethodConfirmSheetOriginals.add(testMethodConfirmSheetOriginal); |
| | | } |
| | | testMethodConfirmSheetOriginalService.saveBatch(testMethodConfirmSheetOriginals); |
| | | return R.ok(); |
| | | } |
| | | |