| | |
| | | |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.RSAPublicKeyExample; |
| | | import com.ruoyi.common.utils.ShortCode; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | sop.setDeptName(serviceTask.getDeptname()); |
| | | sop.setWardName(serviceTask.getLeavehospitaldistrictname()); |
| | | serviceOutPathMapper.insertServiceOutPath(sop); |
| | | //转成16进制并回写radix和updateTime |
| | | serviceOutPath.setRadix(String.format("%03X", sop.getId())); |
| | | // 生成 6 位 base62 短码(带密钥双射,不可枚举)并回写 radix 和 updateTime |
| | | serviceOutPath.setRadix(ShortCode.encode(sop.getId())); |
| | | serviceOutPath.setUrl(StringUtils.isNotEmpty(req_path) ? localIP + ":" + req_path + "/wt?p=" + sop.getRadix() : localIP + "/wt?p=" + sop.getRadix()); |
| | | serviceOutPathMapper.updateServiceOutPath(serviceOutPath); |
| | | return serviceOutPath.getUrl(); |