| | |
| | | return multipartFile; |
| | | } |
| | | @Transactional |
| | | public void savaInMysql(List<TbDkjbxxEntity> list){ |
| | | public void savaInMysql(List<TbDkjbxxEntity> list,String workspaceId){ |
| | | for (int i = 0; i <list.size() ; i++) { |
| | | LotInfo lotInfo = new LotInfo(); |
| | | lotInfo=dbConvertToEntity(list.get(i)); |
| | | lotInfo.setWorkspaceId(workspaceId); |
| | | lotInfo=dbConvertToEntity(list.get(i),workspaceId); |
| | | mapper.insert(lotInfo); |
| | | } |
| | | } |
| | |
| | | * @param file 需要转换的DKJBXX对象。 |
| | | * @return 返回一个构建好的LotInfo对象,包含从数据库实体中转换来的信息。 |
| | | */ |
| | | private LotInfo dbConvertToEntity(TbDkjbxxEntity file) { |
| | | private LotInfo dbConvertToEntity(TbDkjbxxEntity file,String workspaceId) { |
| | | LotInfo.LotInfoBuilder builder = LotInfo.builder(); |
| | | if (file != null) { |
| | | builder.bsm(file.getBsm()) |
| | |
| | | .yzb(file.getYzb()) |
| | | .kzxx(file.getKzxx()) |
| | | .dklx(file.getDklx()) |
| | | .workspaceId(workspaceId) |
| | | .build(); |
| | | } |
| | | return builder.build(); |