| | |
| | | import org.springblade.modules.shareholder.excel.shareImporter; |
| | | import org.springblade.modules.shareholder.service.IShareholderService; |
| | | import org.springblade.modules.shareholder.vo.ShareholderVO; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | |
| | | public class ShareholderController extends BladeController { |
| | | |
| | | private final IShareholderService shareholderService; |
| | | |
| | | private final MyAsyncService myAsyncService; |
| | | /** |
| | | * 详情 |
| | | */ |
| | |
| | | "'" + shareholder.getCell() + "'" + "," + |
| | | "'" + shareholder.getCreditcode() + "'" + "," + |
| | | "'" + shareholder.getDeptId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | String s1 = |
| | | "insert into sys_shareholder(id,shareholder,shareholdingratio,capital,capitalTime,cardid,cell,creditCode,dept_id) " + |
| | |
| | | "'" + shareholder.getCell() + "'" + "," + |
| | | "'" + shareholder.getCreditcode() + "'" + "," + |
| | | "'" + shareholder.getDeptId() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.status(save); |
| | | } |
| | |
| | | ",creditCode = " + "'" + shareholder.getCreditcode() + "'" + |
| | | ",dept_id = " + "'" + shareholder.getDeptId() + "'" + |
| | | " " + "where id = " + "'" + shareholder.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } else { |
| | | //内网同步 |
| | | String s1 = "update sys_shareholder set shareholder = " + "'" + shareholder.getShareholder() + "'" + |
| | |
| | | ",creditCode = " + "'" + shareholder.getCreditcode() + "'" + |
| | | ",dept_id = " + "'" + shareholder.getDeptId() + "'" + |
| | | " " + "where id = " + "'" + shareholder.getId() + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | } |
| | | return R.status(b); |
| | | } |
| | |
| | | List<Long> list = Func.toLongList(ids); |
| | | list.forEach(id -> { |
| | | String s1 = "delete from sys_shareholder where id = " + "'" + id + "'"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | return R.status(shareholderService.removeByIds(Func.toLongList(ids))); |
| | | } |