| | |
| | | import cn.hutool.core.date.DateTime; |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.io.FileUtil; |
| | | import cn.hutool.extra.pinyin.PinyinUtil; |
| | | import cn.hutool.extra.qrcode.QrCodeUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ltkj.LtkjApplication; |
| | | import com.ltkj.common.core.redis.RedisCache; |
| | | import com.ltkj.common.utils.SecurityUtils; |
| | | import com.ltkj.hosp.domain.DictHosp; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjPackage; |
| | | import com.ltkj.hosp.domain.TjProject; |
| | | import com.ltkj.hosp.service.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | // private ITjGroupingProService groupingProService; |
| | | @Autowired |
| | | private ITjProjectService projectService; |
| | | @Resource |
| | | private ITjCustomerService tjCustomerService; |
| | | @Resource |
| | | private ITjPackageService tjPackageService; |
| | | // |
| | | // @Resource |
| | | // private ITjOrderService tjOrderService; |
| | |
| | | private String secret; |
| | | @Test |
| | | public void test() { |
| | | // List<DictHosp> list = dictHospService.list(); |
| | | // DateTime dateTime1 = DateUtil.offsetMonth(new Date(),100); |
| | | // for (DictHosp dictHosp : list) { |
| | | // String mallMerchantSecretKey = SecurityUtils.getMallMerchantSecretKey(secret,dictHosp.getHospAreaId(),dictHosp.getHospAreaName(),dateTime1); |
| | | // dictHosp.setSecretKey(mallMerchantSecretKey); |
| | | // dictHosp.setExpirationTime(dateTime1); |
| | | // dictHospService.updateById(dictHosp); |
| | | // System.out.println(dateTime1); |
| | | // System.out.println("================================================="); |
| | | // System.out.println(mallMerchantSecretKey); |
| | | // } |
| | | /* |
| | | |
| | | } |
| | | // 生成指定url对应的二维码到文件,宽和高都是300像素 |
| | | QrCodeUtil.generate("https://ltpeis.xaltjdkj.cn:5516/1000110001240327094056%E7%8E%89%E5%BF%A0_%E4%BD%93%E6%A3%80%E6%8A%A5%E5%91%8A.pdf", 300, 300, FileUtil.file("D:\\Users\\w\\Desktop\\qrcode.jpg")); |
| | | |
| | | */ |
| | | |
| | | List<TjProject> list = projectService.list(); |
| | | for (TjProject tjProject : list) { |
| | | tjProject.setProEngName(PinyinUtil.getFirstLetter(tjProject.getProName(),"")); |
| | | projectService.updateById(tjProject); |
| | | } |
| | | |
| | | List<TjCustomer> list1 = tjCustomerService.list(); |
| | | for (TjCustomer customer : list1) { |
| | | customer.setPym(PinyinUtil.getFirstLetter(customer.getCusName(),"")); |
| | | tjCustomerService.updateById(customer); |
| | | } |
| | | |
| | | List<TjPackage> list2 = tjPackageService.list(); |
| | | for (TjPackage tjPackage : list2) { |
| | | tjPackage.setPym(PinyinUtil.getFirstLetter(tjPackage.getPacName(),"")); |
| | | tjPackageService.updateById(tjPackage); |
| | | } |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | // String dateStr1 = "2024-03-01 22:33:23"; |
| | | // Date date1 = DateUtil.parse(dateStr1); |
| | | // |
| | | ////相差一个月,31天 |
| | | // long betweenDay = DateUtil.between(new Date(),date1, DateUnit.DAY); |
| | | // System.out.println(betweenDay); |
| | | // System.out.println(DateUtil.between(new Date(),date1, DateUnit.MS)); |
| | | // System.out.println(DateUtil.between(new Date(),date1, DateUnit.SECOND)); |
| | | // PinyinUtil.getFirstLetter(); |
| | | |
| | | } |
| | | |
| | | |
| | | // public static void main(String[] args) { |
| | | // |
| | | // |
| | | // String a ="赵家豪"; |
| | | // String firstLetter = PinyinUtil.getFirstLetter(a, ""); |
| | | // System.out.println(firstLetter); |
| | | // |
| | | // } |
| | | // |
| | | // public static String getAdd(String log, String lat ){ |
| | | // //lat 小 log 大 |