| | |
| | | import org.springblade.modules.dispatcher.vo.DispatcherUnitVO; |
| | | import org.springblade.modules.dispatcher.vo.DispatcherVO; |
| | | import org.springblade.modules.system.service.IUserDeptService; |
| | | import org.springblade.modules.system.service.MyAsyncService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.text.ParseException; |
| | |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * 服务实现类 |
| | | * 服务实现类 |
| | | * |
| | | * @author BladeX |
| | | * @since 2021-07-07 |
| | |
| | | private final IDispatcherService dispatcherService; |
| | | |
| | | private final IUserDeptService userDeptService; |
| | | private final MyAsyncService myAsyncService; |
| | | |
| | | @Override |
| | | public IPage<DispatcherUnitVO> selectDispatcherUnitPage(IPage<DispatcherUnitVO> page, DispatcherUnitVO dispatcherUnitVO) { |
| | |
| | | |
| | | /** |
| | | * 派遣公司信息详情 |
| | | * |
| | | * @param dispatcherUnit 派遣信息对象 |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 自定义树 |
| | | * |
| | | * @param dispatcher |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 派遣导入 |
| | | * |
| | | * @param data |
| | | * @param isCovered |
| | | */ |
| | |
| | | //派遣单位 |
| | | DispatcherUnit dispatcherUnit = new DispatcherUnit(); |
| | | //数据获取 |
| | | if (dispatcherUnitExcel.getDeptName()!=null && dispatcherUnitExcel.getDeptName()!=""){ |
| | | if (dispatcherUnitExcel.getDeptName() != null && dispatcherUnitExcel.getDeptName() != "") { |
| | | String deptId = userDeptService.selectIn(dispatcherUnitExcel.getDeptName()); |
| | | dispatcherUnit.setDeptId(Long.parseLong(deptId)); |
| | | } |
| | | |
| | | if (dispatcherUnitExcel.getName()!=null && dispatcherUnitExcel.getName()!=""){ |
| | | if (dispatcherUnitExcel.getName() != null && dispatcherUnitExcel.getName() != "") { |
| | | //仅中文 |
| | | // String chinese = "^[\\u4E00-\\u9FA5\\uF900-\\uFA2D]+$"; |
| | | // Pattern compile = Pattern.compile(chinese); |
| | |
| | | dispatcherUnit.setName(dispatcherUnitExcel.getName()); |
| | | } |
| | | |
| | | if (dispatcherUnitExcel.getLinkman()!=null && dispatcherUnitExcel.getLinkman()!=""){ |
| | | if (dispatcherUnitExcel.getLinkman() != null && dispatcherUnitExcel.getLinkman() != "") { |
| | | dispatcherUnit.setLinkman(dispatcherUnitExcel.getLinkman()); |
| | | } |
| | | |
| | | if (dispatcherUnitExcel.getPhone()!=null && dispatcherUnitExcel.getPhone()!=""){ |
| | | if (dispatcherUnitExcel.getPhone() != null && dispatcherUnitExcel.getPhone() != "") { |
| | | dispatcherUnit.setPhone(dispatcherUnitExcel.getPhone()); |
| | | } |
| | | |
| | | if (dispatcherUnitExcel.getSecurityLinkman()!=null && dispatcherUnitExcel.getSecurityLinkman()!=""){ |
| | | if (dispatcherUnitExcel.getSecurityLinkman() != null && dispatcherUnitExcel.getSecurityLinkman() != "") { |
| | | dispatcherUnit.setSecurityLinkman(dispatcherUnitExcel.getSecurityLinkman()); |
| | | } |
| | | |
| | | if (dispatcherUnitExcel.getCell()!=null && dispatcherUnitExcel.getCell()!=""){ |
| | | if (dispatcherUnitExcel.getCell() != null && dispatcherUnitExcel.getCell() != "") { |
| | | dispatcherUnit.setCell(dispatcherUnitExcel.getCell()); |
| | | } |
| | | |
| | | if (dispatcherUnitExcel.getServeType()!=null && dispatcherUnitExcel.getServeType()!=""){ |
| | | if (dispatcherUnitExcel.getServeType() != null && dispatcherUnitExcel.getServeType() != "") { |
| | | dispatcherUnit.setServeType(dispatcherUnitExcel.getServeType()); |
| | | } |
| | | |
| | | if (dispatcherUnitExcel.getNum()!=null){ |
| | | if (dispatcherUnitExcel.getNum() != null) { |
| | | dispatcherUnit.setNum(dispatcherUnitExcel.getNum()); |
| | | } |
| | | |
| | |
| | | "'" + dispatcherUnit.getSecurityLinkman() + "'" + "," + |
| | | "'" + dispatcherUnit.getCell() + "'" + "," + |
| | | "'" + dispatcherUnit.getNum() + "'" + ")"; |
| | | FtpUtil.sqlFileUpload(s1); |
| | | //FtpUtil.sqlFileUpload(s1); |
| | | myAsyncService.dataSync(s1); |
| | | }); |
| | | } |
| | | } |