| | |
| | | <version>3.7.0</version> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | <packaging>war</packaging> |
| | | <!-- <packaging>jar</packaging>--> |
| | | <!-- <packaging>war</packaging>--> |
| | | <packaging>jar</packaging> |
| | | <artifactId>smartor-opo</artifactId> |
| | | |
| | | <description> |
| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.framework.config.ServerConfig; |
| | | import com.ruoyi.project.common.CalculateDateUtils; |
| | | import com.ruoyi.project.domain.ServiceDonatebaseinfo; |
| | | import com.ruoyi.project.domain.vo.TimeVO; |
| | | import com.ruoyi.project.service.IServiceDonatebaseinfoService; |
| | |
| | | |
| | | import java.io.*; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | |
| | | |
| | |
| | | @GetMapping(value = "/{id}") |
| | | public AjaxResult getInfo(@PathVariable("id") Long id) { |
| | | log.info("éè¿idè·å¾æ½å¨æç®ä¿¡æ¯ï¼{}", id); |
| | | return AjaxResult.success(serviceDonatebaseinfoService.getById(id)); |
| | | ServiceDonatebaseinfo serviceDonatebaseinfo = serviceDonatebaseinfoService.getById(id); |
| | | if (serviceDonatebaseinfo.getBirthday() != null) { |
| | | Map<String, String> map = CalculateDateUtils.calculateAge(serviceDonatebaseinfo.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()); |
| | | serviceDonatebaseinfo.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null); |
| | | serviceDonatebaseinfo.setAgeunit(map.get("ageUnit")); |
| | | serviceDonatebaseinfo.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null); |
| | | serviceDonatebaseinfo.setAgeunit2(map.get("ageUnit2")); |
| | | } |
| | | return AjaxResult.success(serviceDonatebaseinfo); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.web.controller.project; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.common.annotation.NotRepeatCommit; |
| | | import com.ruoyi.project.common.CalculateDateUtils; |
| | | import com.ruoyi.project.domain.vo.MedicalEvaluationVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | public TableDataInfo listnew(MedicalEvaluationVO medicalEvaluationVO) { |
| | | startPage(); |
| | | List<MedicalEvaluationVO> list = serviceMedicalevaluationService.selectVOList(medicalEvaluationVO); |
| | | for (MedicalEvaluationVO medicalEvaluationVO1 : list) { |
| | | if (medicalEvaluationVO1.getBirthday() != null) { |
| | | Map<String, String> map = CalculateDateUtils.calculateAge(medicalEvaluationVO1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()); |
| | | medicalEvaluationVO1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null); |
| | | medicalEvaluationVO1.setAgeunit(map.get("ageUnit")); |
| | | medicalEvaluationVO1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null); |
| | | medicalEvaluationVO1.setAgeunit2(map.get("ageUnit2")); |
| | | } |
| | | } |
| | | return getDataTable(list); |
| | | } |
| | | |
| | |
| | | } else if (relativeConfirmation.getSex().equals("2")) { |
| | | dataMap.put("XB", "女"); |
| | | } |
| | | |
| | | dataMap.put("CSRQ", relativeConfirmation.getBirthday() == null ? "" : relativeConfirmation.getBirthday().substring(0, 10)); |
| | | SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | dataMap.put("CSRQ", relativeConfirmation.getBirthday() == null ? "" : simpleDateFormat.format(relativeConfirmation.getBirthday()).substring(0, 10)); |
| | | dataMap.put("MZ", NationalityEnum.getDescByCode(relativeConfirmation.getNation()) == null ? "" : NationalityEnum.getDescByCode(relativeConfirmation.getNation())); |
| | | dataMap.put("XL", Education.getDescByCode(relativeConfirmation.getEducation()) == null ? "" : Education.getDescByCode(relativeConfirmation.getEducation())); |
| | | String occupation = ""; |
| | |
| | | # ä¸»åºæ°æ®æº |
| | | master: |
| | | # å¼åç¯å¢ |
| | | url: jdbc:mysql://116.62.18.175:6002/opo?allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: opo |
| | | password: opo@2022 |
| | | # url: jdbc:mysql://192.168.100.10:3306/opo?allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 |
| | | # url: jdbc:mysql://116.62.18.175:6002/opo?allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 |
| | | # username: opo |
| | | # password: Smartor.2023 |
| | | url: jdbc:mysql://192.168.100.10:3306/opo?allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8 |
| | | username: smartor |
| | | password: Smartor.2023 |
| | | |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | |
| | | # å½é
åèµæºæä»¶è·¯å¾ |
| | | basename: i18n/messages |
| | | profiles: |
| | | active: srm |
| | | active: druid |
| | | # æä»¶ä¸ä¼ |
| | | servlet: |
| | | multipart: |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.project.common; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.Period; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class CalculateDateUtils { |
| | | public static Map<String, String> calculateAge(LocalDate birthdate, LocalDate today) { |
| | | if (birthdate == null || today.isBefore(birthdate)) { |
| | | return null; |
| | | } |
| | | Map<String, String> ageMap = new HashMap<>(); |
| | | |
| | | Period period = Period.between(birthdate, today); |
| | | long totalDays = ChronoUnit.DAYS.between(birthdate, today); |
| | | long totalMonths = ChronoUnit.MONTHS.between(birthdate, today); |
| | | |
| | | int years = period.getYears(); |
| | | int months = period.getMonths(); |
| | | int days = period.getDays(); |
| | | |
| | | String ageUnit; |
| | | Integer age; |
| | | String ageUnit2 = null; |
| | | Integer age2 = null; |
| | | |
| | | if (totalDays < 30) { |
| | | // å°äº 1 个æï¼æå¤©è®¡ç® |
| | | ageUnit = "天"; |
| | | age = (int) totalDays; |
| | | ageMap.put("age", age != null ? age.toString() : null); |
| | | ageMap.put("ageUnit", ageUnit); |
| | | ageMap.put("age2", null); |
| | | ageMap.put("ageUnit2", null); |
| | | } else if (totalMonths < 12) { |
| | | // å°äº ä¸å¹´ï¼ææ + å¤©è®¡ç® |
| | | ageUnit = "æ"; |
| | | age = (int) totalMonths; |
| | | ageUnit2 = "天"; |
| | | age2 = days; |
| | | ageMap.put("age", age != null ? age.toString() : null); |
| | | ageMap.put("ageUnit", ageUnit); |
| | | ageMap.put("age2", age2 != null ? age2.toString() : null); |
| | | ageMap.put("ageUnit2", ageUnit2); |
| | | } else { |
| | | // 大äºçäº ä¸å¹´ï¼æå¹´ + æè®¡ç® |
| | | ageUnit = "å²"; |
| | | age = years; |
| | | ageUnit2 = "æ"; |
| | | age2 = months; |
| | | ageMap.put("age", age != null ? age.toString() : null); |
| | | ageMap.put("ageUnit", ageUnit); |
| | | ageMap.put("age2", age2 != null ? age2.toString() : null); |
| | | ageMap.put("ageUnit2", ageUnit2); |
| | | } |
| | | |
| | | return ageMap; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * å¹´é¾ |
| | | */ |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("å¹´é¾") |
| | | private Long age; |
| | | |
| | | /** |
| | | * å¹´é¾åä½ |
| | | */ |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("å¹´é¾åä½") |
| | | private String ageunit; |
| | | /** |
| | | * å¹´é¾ |
| | | */ |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("å¹´é¾") |
| | | private Long age2; |
| | | |
| | | /** |
| | | * å¹´ |
| | | * é¾åä½ |
| | | */ |
| | | @TableField(exist = false) |
| | | @ApiModelProperty("å¹´é¾åä½") |
| | | private String ageunit2; |
| | | |
| | | /** |
| | | * åºçæ¥æ |
| | |
| | | private String sex; |
| | | private Long idcardtype; |
| | | private String idcardno; |
| | | private String age; |
| | | private Long age; |
| | | private String ageunit; |
| | | private String birthday; |
| | | private Long age2; |
| | | private String ageunit2; |
| | | private Date birthday; |
| | | private String phone; |
| | | private String treatmenthospitalno; |
| | | private String treatmenthospitalname; |
| | |
| | | private String sex; |
| | | private Long idcardtype; |
| | | private String idcardno; |
| | | private String age; |
| | | private Long age; |
| | | private String ageunit; |
| | | private String birthday; |
| | | private Long age2; |
| | | private String ageunit2; |
| | | private Date birthday; |
| | | private String phone; |
| | | private String nationality; |
| | | private String nativeplace; |
| | |
| | | private String idcardno; |
| | | private Long age; |
| | | private String ageunit; |
| | | private String birthday; |
| | | private Long age2; |
| | | private String ageunit2; |
| | | private Date birthday; |
| | | private String nationality; |
| | | private String nation; |
| | | private String reporterno; |
| | |
| | | private Long idcardtype; |
| | | private String idcardno; |
| | | private Long age; |
| | | private String birthday; |
| | | private String ageunit; |
| | | private String ageunit2; |
| | | private Long age2; |
| | | private Date birthday; |
| | | private String treatmenthospitalno; |
| | | private String treatmenthospitalname; |
| | | private String treatmentdeptname; |
| | |
| | | */ |
| | | @ApiModelProperty("å¹´é¾åä½") |
| | | private String ageunit; |
| | | /** |
| | | * å¹´é¾2 |
| | | */ |
| | | @ApiModelProperty("å¹´é¾2") |
| | | private Long age2; |
| | | |
| | | /** |
| | | * å¹´é¾åä½2 |
| | | */ |
| | | @ApiModelProperty("å¹´é¾åä½2") |
| | | private String ageunit2; |
| | | |
| | | /** |
| | | * åºçæ¥æ |
| | |
| | | private String name; |
| | | private String sex; |
| | | private String idcardno; |
| | | private Date Birthday; |
| | | private Long age; |
| | | private String ageunit; |
| | | private Long age2; |
| | | private String ageunit2; |
| | | private String registeraddress; |
| | | private String registerprovince; |
| | | private String registerprovinceName; |
| | |
| | | private Long idcardtype; |
| | | private String idcardno; |
| | | private Long Age; |
| | | private String birthday; |
| | | private Long Age2; |
| | | private Date birthday; |
| | | private String ageunit; |
| | | private String ageunit2; |
| | | private String phone; |
| | | private String nationality; |
| | | private String nativeplace; |
| | |
| | | import java.util.List; |
| | | import com.ruoyi.project.domain.ServiceDonateannex; |
| | | import com.ruoyi.project.domain.vo.DonateAnnexVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * æç®éä»¶Mapperæ¥å£ |
| | |
| | | * @author ruoyi |
| | | * @date 2021-11-11 |
| | | */ |
| | | @Mapper |
| | | public interface ServiceDonateannexMapper extends BaseMapper<ServiceDonateannex> |
| | | { |
| | | /** |
| | |
| | | package com.ruoyi.project.service.impl; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | |
| | | import com.ruoyi.common.exception.base.BaseException; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.project.common.CalculateDateUtils; |
| | | import com.ruoyi.project.domain.vo.DonateAnnexVO; |
| | | import com.ruoyi.project.domain.vo.EthicalReviewVO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | if (b) { |
| | | donateAnnexVO.setCreate_by(user.getUserName()); |
| | | } |
| | | return serviceDonateannexMapper.selectVOList(donateAnnexVO); |
| | | List<DonateAnnexVO> donateAnnexVOS = serviceDonateannexMapper.selectVOList(donateAnnexVO); |
| | | for (DonateAnnexVO donateAnnexVO1 : donateAnnexVOS) { |
| | | if (donateAnnexVO1.getBirthday() != null) { |
| | | Map<String, String> map = CalculateDateUtils.calculateAge(donateAnnexVO1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()); |
| | | donateAnnexVO1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null); |
| | | donateAnnexVO1.setAgeunit(map.get("ageUnit")); |
| | | donateAnnexVO1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null); |
| | | donateAnnexVO1.setAgeunit2(map.get("ageUnit2")); |
| | | } |
| | | } |
| | | |
| | | return donateAnnexVOS; |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.ruoyi.project.service.impl; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.Period; |
| | | import java.time.ZoneId; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | |
| | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.project.common.CalculateDateUtils; |
| | | import com.ruoyi.project.domain.*; |
| | | import com.ruoyi.project.domain.vo.TimeVO; |
| | | import com.ruoyi.project.domain.vo.countByRecordStateVO; |
| | |
| | | if (b == 2) { |
| | | serviceDonatebaseinfo.setDeptid(user.getDeptId()); |
| | | } |
| | | return serviceDonatebaseinfoMapper.selectServiceDonatebaseinfoList(serviceDonatebaseinfo); |
| | | List<ServiceDonatebaseinfo> serviceDonatebaseinfos = serviceDonatebaseinfoMapper.selectServiceDonatebaseinfoList(serviceDonatebaseinfo); |
| | | for (ServiceDonatebaseinfo serviceDonatebaseinfo1 : serviceDonatebaseinfos) { |
| | | if (serviceDonatebaseinfo1.getBirthday() != null) { |
| | | Map<String, String> map = CalculateDateUtils.calculateAge(serviceDonatebaseinfo1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()); |
| | | serviceDonatebaseinfo1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null); |
| | | serviceDonatebaseinfo1.setAgeunit(map.get("ageUnit")); |
| | | serviceDonatebaseinfo1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null); |
| | | serviceDonatebaseinfo1.setAgeunit2(map.get("ageUnit2")); |
| | | } |
| | | } |
| | | |
| | | return serviceDonatebaseinfos; |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.ruoyi.project.service.impl; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.common.CalculateDateUtils; |
| | | import com.ruoyi.project.domain.ServiceDonatebaseinfo; |
| | | import com.ruoyi.project.domain.ServiceDonatecompletioninfo; |
| | | import com.ruoyi.project.domain.ServiceDonatecomporgan; |
| | | import com.ruoyi.project.domain.ServiceDonateorgan; |
| | | import com.ruoyi.project.domain.vo.DonationCompletionVO; |
| | | import com.ruoyi.project.mapper.ServiceDonatecompletioninfoMapper; |
| | | import com.ruoyi.project.service.IServiceDonatecompletioninfoService; |
| | | import com.ruoyi.project.service.IServiceDonatecomporganService; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.mapper.ServiceDonatecompletioninfoMapper; |
| | | import com.ruoyi.project.domain.ServiceDonatecompletioninfo; |
| | | import com.ruoyi.project.service.IServiceDonatecompletioninfoService; |
| | | |
| | | /** |
| | | * æç®å®æServiceä¸å¡å±å¤ç |
| | |
| | | if (b) { |
| | | donationCompletionVO.setReporterno(user.getUserName()); |
| | | } |
| | | List<DonationCompletionVO> donationCompletionVOS = serviceDonatecompletioninfoMapper.selectVOList(donationCompletionVO); |
| | | |
| | | return serviceDonatecompletioninfoMapper.selectVOList(donationCompletionVO); |
| | | for (DonationCompletionVO donationCompletionVO1 : donationCompletionVOS) { |
| | | if (donationCompletionVO1.getBirthday() != null) { |
| | | Map<String, String> map = CalculateDateUtils.calculateAge(donationCompletionVO1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()); |
| | | donationCompletionVO1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null); |
| | | donationCompletionVO1.setAgeunit(map.get("ageUnit")); |
| | | donationCompletionVO1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null); |
| | | donationCompletionVO1.setAgeunit2(map.get("ageUnit2")); |
| | | } |
| | | } |
| | | |
| | | return donationCompletionVOS; |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.bean.DtoConversionUtils; |
| | | import com.ruoyi.project.common.CalculateDateUtils; |
| | | import com.ruoyi.project.domain.*; |
| | | import com.ruoyi.project.domain.vo.*; |
| | | import com.ruoyi.project.mapper.*; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | |
| | | @Override |
| | | public List<DonateOrganVO> selectVOList(DonateOrganVO donateOrganVO) { |
| | | |
| | | return serviceDonateorganMapper.selectVOList(donateOrganVO); |
| | | List<DonateOrganVO> donateOrganVOS = serviceDonateorganMapper.selectVOList(donateOrganVO); |
| | | for (DonateOrganVO donateOrganVO1:donateOrganVOS) { |
| | | if (donateOrganVO1.getBirthday() != null) { |
| | | Map<String, String> map = CalculateDateUtils.calculateAge(donateOrganVO1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()); |
| | | donateOrganVO1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null); |
| | | donateOrganVO1.setAgeunit(map.get("ageUnit")); |
| | | donateOrganVO1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null); |
| | | donateOrganVO1.setAgeunit2(map.get("ageUnit2")); |
| | | } |
| | | } |
| | | return donateOrganVOS; |
| | | } |
| | | |
| | | @Override |
| | |
| | | package com.ruoyi.project.service.impl; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.project.common.CalculateDateUtils; |
| | | import com.ruoyi.project.domain.ServiceDonatebaseinfo; |
| | | import com.ruoyi.project.domain.ServiceDonateorgan; |
| | | import com.ruoyi.project.domain.vo.DonationWitnessVO; |
| | |
| | | donationWitnessVO.setReporterno(user.getUserName()); |
| | | } |
| | | List<DonationWitnessVO> donationWitnessVOS = serviceDonationwitnessMapper.selectVOList(donationWitnessVO); |
| | | for (DonationWitnessVO donationWitnessVO1 : donationWitnessVOS) { |
| | | if (donationWitnessVO1.getBirthday() != null) { |
| | | Map<String, String> map = CalculateDateUtils.calculateAge(donationWitnessVO1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()); |
| | | donationWitnessVO1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null); |
| | | donationWitnessVO1.setAgeunit(map.get("ageUnit")); |
| | | donationWitnessVO1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null); |
| | | donationWitnessVO1.setAgeunit2(map.get("ageUnit2")); |
| | | } |
| | | } |
| | | return donationWitnessVOS; |
| | | } |
| | | |
| | |
| | | package com.ruoyi.project.service.impl; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.project.common.CalculateDateUtils; |
| | | import com.ruoyi.project.domain.vo.EthicalReviewVO; |
| | | import com.ruoyi.project.domain.vo.MedicalEvaluationVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.mapper.ServiceEthicalreviewopinionsMapper; |
| | | import com.ruoyi.project.domain.ServiceEthicalreviewopinions; |
| | |
| | | * @date 2021-11-23 |
| | | */ |
| | | @Service |
| | | public class ServiceEthicalreviewopinionsServiceImpl extends ServiceImpl<ServiceEthicalreviewopinionsMapper, ServiceEthicalreviewopinions> implements IServiceEthicalreviewopinionsService |
| | | { |
| | | public class ServiceEthicalreviewopinionsServiceImpl extends ServiceImpl<ServiceEthicalreviewopinionsMapper, ServiceEthicalreviewopinions> implements IServiceEthicalreviewopinionsService { |
| | | |
| | | @Autowired |
| | | ServiceEthicalreviewopinionsMapper serviceEthicalreviewopinionsMapper; |
| | |
| | | if(b){ |
| | | ethicalReviewVO.setReporterno(user.getUserName()); |
| | | } |
| | | List<EthicalReviewVO> ethicalReviewVOS = serviceEthicalreviewopinionsMapper.selectVOList(ethicalReviewVO); |
| | | |
| | | return serviceEthicalreviewopinionsMapper.selectVOList(ethicalReviewVO); |
| | | for (EthicalReviewVO ethicalReviewVO1 : ethicalReviewVOS) { |
| | | if (ethicalReviewVO1.getBirthday() != null) { |
| | | Map<String, String> map = CalculateDateUtils.calculateAge(ethicalReviewVO1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()); |
| | | ethicalReviewVO1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null); |
| | | ethicalReviewVO1.setAgeunit(map.get("ageUnit")); |
| | | ethicalReviewVO1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null); |
| | | ethicalReviewVO1.setAgeunit2(map.get("ageUnit2")); |
| | | } |
| | | } |
| | | return ethicalReviewVOS; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | //053审æ¹éè¿ä¹åï¼å°±éè¦æâåå
¬å®¤ä¸»ä»»âçååå¡«ä¸ |
| | | if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("053")) { |
| | | serviceFund.setOfficedirector("审æ¹äººï¼" + user.getNickName() + " & å®¡æ¹æ¶é´" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " & 审æ¹ç»æï¼éè¿"); |
| | | serviceFund.setOfficedirector(user.getNickName()); |
| | | serviceFund.setUploadStates(1); |
| | | //æ°æ®åé |
| | | Boolean aBoolean1 = null; |
| | |
| | | } |
| | | } |
| | | System.out.println("serviceFundç弿¯--------:" + serviceFund); |
| | | log.info("å¼å§æ´æ°çç弿¯--------"); |
| | | |
| | | Boolean aBoolean1 = updateById(serviceFund); |
| | | log.info("integeræ´æ°çç弿¯-------- :{}", aBoolean1); |
| | | ServiceSystemmessage serviceSystemmessage = new ServiceSystemmessage(); |
| | |
| | | |
| | | |
| | | private Map<String, Object> getformmain_0831(ServiceFund serviceFund) { |
| | | ServiceFundflow serviceFundflow = new ServiceFundflow(); |
| | | serviceFundflow.setFundid(serviceFund.getId()); |
| | | serviceFundflow.setFundtype(2); |
| | | List<ServiceFundflow> serviceFundflows = serviceFundflowService.queryList(serviceFundflow); |
| | | |
| | | Map<String, Object> formmain_0831 = new HashMap<>(); |
| | | formmain_0831.put("æç®è
å§å", serviceFund.getDonorname()); |
| | | formmain_0831.put("æ¥é人å", serviceFund.getUsername()); |
| | |
| | | formmain_0831.put("ä¸ä¼ éä»¶", null); |
| | | formmain_0831.put("夿³¨", null); |
| | | formmain_0831.put("è´¢å¡å®¡æ¹", null); |
| | | formmain_0831.put("è´¢å¡é¨è´è´£äººå®¡æ¹", serviceFund.getFinancedirector()); |
| | | formmain_0831.put("åå
¬å®¤ä¸»ä»»å®¡æ¹", serviceFund.getOfficedirector()); |
| | | formmain_0831.put("è´¢å¡é¨è´è´£äººå®¡æ¹", getLastApprovalInfo(serviceFundflows, serviceFund.getFinancedirector())); |
| | | formmain_0831.put("åå
¬å®¤ä¸»ä»»å®¡æ¹", getLastApprovalInfo(serviceFundflows, serviceFund.getOfficedirector())); |
| | | formmain_0831.put("ä¸å¡å¯é¢é¿å®¡æ¹", serviceFund.getBusvicepresident()); |
| | | formmain_0831.put("è´¢å¡å¯é¢é¿å®¡æ¹", serviceFund.getFinvicepresident()); |
| | | formmain_0831.put("ä¸å¿è´è´£äººå®¡æ¹", serviceFund.getOpochecker()); |
| | | formmain_0831.put("æ¯ä»æ¹å¼", serviceFund.getZffs()); |
| | | formmain_0831.put("ç»é¿", serviceFund.getManagername()); |
| | | formmain_0831.put("审æ¹äººå", serviceFund.getFinancechecher()); |
| | | formmain_0831.put("ç»é¿", getLastApprovalInfo(serviceFundflows, serviceFund.getManagername())); |
| | | formmain_0831.put("审æ¹äººå", getLastApprovalInfo(serviceFundflows, serviceFund.getFinancechecher())); |
| | | formmain_0831.put("æ¯ä»æ¥æ", serviceFund.getRiqi()); |
| | | formmain_0831.put("è¯å«äºº-ä½åº", null); |
| | | formmain_0831.put("è´¢å¡å®¡æ¹ç¾å", serviceFund.getFinancedirector()); |
| | |
| | | return formmain_0831; |
| | | } |
| | | |
| | | |
| | | public String getLastApprovalInfo(List<ServiceFundflow> serviceFundflows, String managerName) { |
| | | if (StringUtils.isEmpty(managerName)) return ""; |
| | | if (CollectionUtils.isEmpty(serviceFundflows)) { |
| | | //å¦ææ¯æåä¸ä¸ªäººå®¡æ¹ï¼è¿ä¸ªæ¶åå¯è½flowéè¿æ²¡æçæè¿å» |
| | | SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | return "审æ¹äººï¼" + managerName + " & å®¡æ¹æ¶é´ï¼" + sd.format(new Date()) + " & 审æ¹ç»æï¼éè¿"; |
| | | } |
| | | |
| | | Optional<ServiceFundflow> lastApproval = serviceFundflows.stream().filter(flow -> flow.getCheckusername().contains(managerName)).max(Comparator.comparing(ServiceFundflow::getCheckTime)); |
| | | |
| | | if (lastApproval.isPresent()) { |
| | | ServiceFundflow flow = lastApproval.get(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | if (flow.getCheckTime() == null) { |
| | | flow.setCheckTime(new Date()); |
| | | } |
| | | String formattedTime = sdf.format(flow.getCheckTime()); |
| | | |
| | | return "审æ¹äººï¼" + managerName + " & å®¡æ¹æ¶é´ï¼" + formattedTime + " & 审æ¹ç»æï¼éè¿"; |
| | | } |
| | | |
| | | return ""; |
| | | } |
| | | |
| | | @Override |
| | | public Long getFundId(Long infoid) { |
| | | return serviceFundMapper.getFundId(infoid); |
| | |
| | | } |
| | | //053审æ¹éè¿ä¹åï¼å°±éè¦æâåå
¬å®¤ä¸»ä»»âçååå¡«ä¸ |
| | | if (checkFundVO.getFlowconclusion() == 1 && user.getUserName().equals("053")) { |
| | | serviceReimbursement.setOfficedirector("审æ¹äººï¼" + user.getNickName() + " & å®¡æ¹æ¶é´" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()) + " & 审æ¹ç»æï¼éè¿"); |
| | | serviceReimbursement.setOfficedirector(user.getNickName()); |
| | | serviceReimbursement.setUploadStates(1); |
| | | |
| | | Boolean aBoolean1 = null; |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | // if (StringUtils.isNotEmpty(serviceReimbursement.getManagername()) && serviceReimbursement.getManagername().equals(loginUser.getUser().getNickName())) { |
| | | // serviceReimbursement.setManagername("审æ¹äººï¼" + serviceReimbursement.getManagername() + " & å®¡æ¹æ¶é´" + new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()) + " & 审æ¹ç»æï¼éè¿"); |
| | | // } |
| | | updateById(serviceReimbursement); |
| | | |
| | | ServiceSystemmessage serviceSystemmessage = new ServiceSystemmessage(); |
| | |
| | | return allMap; |
| | | } |
| | | |
| | | |
| | | public String getLastApprovalInfo(List<ServiceFundflow> serviceFundflows, String managerName) { |
| | | if (StringUtils.isEmpty(managerName)) return null; |
| | | if (org.springframework.util.CollectionUtils.isEmpty(serviceFundflows)) { |
| | | //å¦ææ¯æåä¸ä¸ªäººå®¡æ¹ï¼è¿ä¸ªæ¶åå¯è½flowéè¿æ²¡æçæè¿å» |
| | | SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | return "审æ¹äººï¼" + managerName + " & å®¡æ¹æ¶é´ï¼" + sd.format(new Date()) + " & 审æ¹ç»æï¼éè¿"; |
| | | } |
| | | |
| | | Optional<ServiceFundflow> lastApproval = serviceFundflows.stream() |
| | | .filter(flow -> flow.getCheckusername().contains(managerName)) |
| | | .max(Comparator.comparing(ServiceFundflow::getCheckTime)); |
| | | |
| | | if (lastApproval.isPresent()) { |
| | | ServiceFundflow flow = lastApproval.get(); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | if(flow.getCheckTime()==null){ |
| | | flow.setCheckTime(new Date()); |
| | | } |
| | | String formattedTime = sdf.format(flow.getCheckTime()); |
| | | |
| | | return "审æ¹äººï¼" + managerName + " & å®¡æ¹æ¶é´ï¼" + formattedTime + " & 审æ¹ç»æï¼éè¿"; |
| | | } |
| | | |
| | | return "æªæ¾å°å®¡æ¹è®°å½"; |
| | | } |
| | | |
| | | public Boolean sendData(ServiceReimbursement serviceReimbursement) { |
| | | // fundåfunddetailçæ°æ®è·å |
| | |
| | | } |
| | | |
| | | private Map<String, Object> formmain_1209(ServiceReimbursementShared serviceReimbursementShared) { |
| | | ServiceFundflow serviceFundflow = new ServiceFundflow(); |
| | | serviceFundflow.setFundid(serviceReimbursementShared.getReimid()); |
| | | serviceFundflow.setFundtype(1); |
| | | List<ServiceFundflow> serviceFundflows = serviceFundflowService.queryList(serviceFundflow); |
| | | |
| | | |
| | | Map<String, Object> formmain_1209 = new HashMap<>(); |
| | | |
| | | formmain_1209.put("æ¥éæ¥æ", new SimpleDateFormat("yyyy-MM-dd HH:mm").format(serviceReimbursementShared.getApplyTime())); |
| | | formmain_1209.put("åºå·®äºº-ä½åº", ""); |
| | | formmain_1209.put("æ¥é人", serviceReimbursementShared.getUsername()); |
| | | formmain_1209.put("åºåç»é¿", serviceReimbursementShared.getManagername()); |
| | | formmain_1209.put("åºåç»é¿", getLastApprovalInfo(serviceFundflows, serviceReimbursementShared.getManagername())); |
| | | formmain_1209.put("åºå·®äºç±", serviceReimbursementShared.getReason()); |
| | | formmain_1209.put("天æ°å计", 0.00); |
| | | formmain_1209.put("交éè´¹å计", serviceReimbursementShared.getTotalamount()); |
| | |
| | | formmain_1209.put("颿¬¾éé¢å¤§å", serviceReimbursementShared.getBigstrmoney()); |
| | | formmain_1209.put("颿¬¾éé¢", serviceReimbursementShared.getAmountrequested()); |
| | | formmain_1209.put("è´¢å¡å®¡æ¹", ""); |
| | | formmain_1209.put("è´¢å¡é¨è´è´£äººå®¡æ¹", serviceReimbursementShared.getFinancedirector()); |
| | | formmain_1209.put("åå
¬å®¤ä¸»ä»»å®¡æ¹", serviceReimbursementShared.getOfficedirector()); |
| | | formmain_1209.put("è´¢å¡é¨è´è´£äººå®¡æ¹", getLastApprovalInfo(serviceFundflows, serviceReimbursementShared.getFinancedirector())); |
| | | formmain_1209.put("åå
¬å®¤ä¸»ä»»å®¡æ¹", getLastApprovalInfo(serviceFundflows, serviceReimbursementShared.getOfficedirector())); |
| | | formmain_1209.put("夿³¨", serviceReimbursementShared.getRemark()); |
| | | formmain_1209.put("ä¸å¡å¯é¢é¿å®¡æ¹", serviceReimbursementShared.getBusvicepresident()); |
| | | formmain_1209.put("è´¢å¡å¯é¢é¿å®¡æ¹", serviceReimbursementShared.getFinvicepresident()); |
| | |
| | | formmain_1209.put("å¡å·-ä½åº", ""); |
| | | formmain_1209.put("æ¯ä»æ¹å¼", serviceReimbursementShared.getZffs()); |
| | | formmain_1209.put("ç»é¿", serviceReimbursementShared.getManagername()); |
| | | formmain_1209.put("审æ¹äººå", serviceReimbursementShared.getFinancechecher()); |
| | | formmain_1209.put("审æ¹äººå", getLastApprovalInfo(serviceFundflows, serviceReimbursementShared.getFinancechecher())); |
| | | formmain_1209.put("æ¯ä»æ¥æ", serviceReimbursementShared.getRiqi()); |
| | | formmain_1209.put("ä¸ä¼ éä»¶", ""); |
| | | formmain_1209.put("ææ¬¾å计", 0.00); |
| | | formmain_1209.put("å票è¯å«-ä½åº", ""); |
| | | formmain_1209.put("è¯å«äºº-ä½åº", ""); |
| | | formmain_1209.put("è´¢å¡å®¡æ¹ç¾å", ""); |
| | | formmain_1209.put("è´¢å¡é¨è´è´£äººå®¡æ¹ç¾å", serviceReimbursementShared.getFinancedirector()); |
| | | formmain_1209.put("è´¢å¡é¨è´è´£äººå®¡æ¹ç¾å", getLastApprovalInfo(serviceFundflows, serviceReimbursementShared.getFinancedirector())); |
| | | formmain_1209.put("表åç¼å·1", ""); |
| | | formmain_1209.put("CIFè´¦å¥é
ç½®1", ""); |
| | | formmain_1209.put("é¢åº", ""); |
| | |
| | | package com.ruoyi.project.service.impl; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.ZoneId; |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.DateUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.project.common.CalculateDateUtils; |
| | | import com.ruoyi.project.domain.ServiceDonatebaseinfo; |
| | | import com.ruoyi.project.domain.vo.MedicalEvaluationVO; |
| | | import com.ruoyi.project.domain.vo.RelativeConfirmationVO; |
| | | import com.ruoyi.project.mapper.ServiceDonatebaseinfoMapper; |
| | | import com.ruoyi.project.service.IServiceDonatebaseinfoService; |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Map; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.project.mapper.ServiceRelativesconfirmationMapper; |
| | | import com.ruoyi.project.domain.ServiceRelativesconfirmation; |
| | |
| | | * @date 2021-11-15 |
| | | */ |
| | | @Service |
| | | public class ServiceRelativesconfirmationServiceImpl extends ServiceImpl<ServiceRelativesconfirmationMapper, ServiceRelativesconfirmation> implements IServiceRelativesconfirmationService |
| | | { |
| | | public class ServiceRelativesconfirmationServiceImpl extends ServiceImpl<ServiceRelativesconfirmationMapper, ServiceRelativesconfirmation> implements IServiceRelativesconfirmationService { |
| | | |
| | | @Autowired |
| | | IServiceDonatebaseinfoService serviceDonatebaseinfoService; |
| | |
| | | |
| | | if(first == -1){ |
| | | return oldDonateNumber; |
| | | } |
| | | else { |
| | | } else { |
| | | StringBuilder newDonateNumber = new StringBuilder(oldDonateNumber); |
| | | newDonateNumber.replace(first, first + 2, adjustcoordinateUserId); |
| | | String updateNumber = newDonateNumber.toString(); |
| | |
| | | if(b){ |
| | | relativeConfirmationVO.setReporterno(user.getUserName()); |
| | | } |
| | | |
| | | return serviceRelativesconfirmationMapper.selectVOList(relativeConfirmationVO); |
| | | List<RelativeConfirmationVO> relativeConfirmationVOS = serviceRelativesconfirmationMapper.selectVOList(relativeConfirmationVO); |
| | | for (RelativeConfirmationVO relativeConfirmationVO1 : relativeConfirmationVOS) { |
| | | if (relativeConfirmationVO1.getBirthday() != null) { |
| | | Map<String, String> map = CalculateDateUtils.calculateAge(relativeConfirmationVO1.getBirthday().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(), LocalDate.now()); |
| | | relativeConfirmationVO1.setAge(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age")) ? Long.valueOf(map.get("age")) : null); |
| | | relativeConfirmationVO1.setAgeunit(map.get("ageUnit")); |
| | | relativeConfirmationVO1.setAge2(org.apache.commons.lang3.ObjectUtils.isNotEmpty(map.get("age2")) ? Long.valueOf(map.get("age2")) : null); |
| | | relativeConfirmationVO1.setAgeunit2(map.get("ageUnit2")); |
| | | } |
| | | } |
| | | return relativeConfirmationVOS; |
| | | } |
| | | |
| | | } |
| | |
| | | service_donatebaseinfo.Sex as sex, |
| | | service_donatebaseinfo.Age as age, |
| | | service_donatebaseinfo.AgeUnit as ageUnit, |
| | | service_donatebaseinfo.Birthday as irthday, |
| | | service_donatebaseinfo.Birthday as birthday, |
| | | service_donatebaseinfo.Phone as phone, |
| | | service_donatebaseinfo.Nationality as nationality, |
| | | service_donatebaseinfo.NativePlace as nativePlace, |
| | |
| | | `service_donatebaseinfo`.`Name` AS `Name`, |
| | | `service_donatebaseinfo`.`Sex` AS `Sex`, |
| | | `service_donatebaseinfo`.`IDCardNo` AS `IDCardNo`, |
| | | `service_donatebaseinfo`.`Age` AS `Age`, |
| | | `service_donatebaseinfo`.`Birthday` AS `Birthday`, |
| | | `service_donatebaseinfo`.`RegisterAddress` AS `RegisterAddress`, |
| | | `service_donatebaseinfo`.`RegisterProvince` AS `RegisterProvince`, |
| | | `service_donatebaseinfo`.`RegisterProvinceName` AS `RegisterProvinceName`, |