| | |
| | | @ApiOperation(value = "所有公司体检收费数据查询接口") |
| | | public AjaxResult list(@RequestParam(required = false) @ApiParam(value = "单位id") String compId) { |
| | | |
| | | List<TjReservation> rightList = reservationService.list(new LambdaQueryWrapper<TjReservation>().eq(TjReservation::getCompanyId, compId)); |
| | | // List<TjReservation> rightList = reservationService.list(new LambdaQueryWrapper<TjReservation>().eq(TjReservation::getCompanyId, compId)); |
| | | List<TjReservation> rightList = reservationService.getFirimSfList(compId); |
| | | |
| | | Map<String, List<TjReservation>> collect = rightList.stream().collect(Collectors.groupingBy(TjReservation::getPacId)); |
| | | |
| | |
| | | List<TjTeamSelectRecord> selectRecordList = selectRecordService.list(wq0); |
| | | if(null !=selectRecordList && !selectRecordList.isEmpty()){ |
| | | for(TjTeamSelectRecord selectRecord : selectRecordList){ |
| | | selectRecord.setSjCount(orderService.count(new LambdaQueryWrapper<TjOrder>() |
| | | .eq(TjOrder::getTeamNo,selectRecord.getTeamNo()).eq(TjOrder::getPacId,selectRecord.getPacId()))); |
| | | selectRecord.setSjCount(orderService.getTjTeamSelectRecordCount(selectRecord.getTeamNo(),selectRecord.getCompId(),selectRecord.getPacId())); |
| | | |
| | | TjDwGrouping dwGrouping = dwGroupingService.getById(selectRecord.getPacId()); |
| | | if(null !=dwGrouping){ |
| | |
| | | LambdaQueryWrapper<TjReservation> wrapper = new LambdaQueryWrapper<>(); |
| | | wrapper.eq(TjReservation::getTeamNo, teamNo); |
| | | if(StringUtil.isNotBlank(pacId))wrapper.eq(TjReservation::getPacId, pacId); |
| | | List<TjReservation> reservationList = reservationService.list(wrapper); |
| | | // List<TjReservation> reservationList = reservationService.list(wrapper); |
| | | List<TjReservation> reservationList = reservationService.getTeamTjPeopleList(teamNo, pacId); |
| | | if (null != reservationList && !reservationList.isEmpty()) { |
| | | List<TeamTjPeopleVo> syList = new ArrayList<>(); |
| | | List<TeamTjPeopleVo> yjwjzList = new ArrayList<>(); |
| | |
| | | throw new RuntimeException(e); |
| | | } |
| | | if (null != customer) { |
| | | TjOrder tjOrder = orderService.getOne(new LambdaQueryWrapper<TjOrder>().eq(TjOrder::getUserId, customer.getCusId()).eq(TjOrder::getTeamNo, teamNo)); |
| | | TjOrder tjOrder = orderService.getOne(new LambdaQueryWrapper<TjOrder>() |
| | | .eq(TjOrder::getUserId, customer.getCusId()) |
| | | .and(w->w.eq(TjOrder::getTeamNo, teamNo).or().eq(TjOrder::getPacId,reservation.getPacId()))); |
| | | if (null != tjOrder) { |
| | | TjFlowingWater water = tjFlowingWaterService.getOne(new LambdaQueryWrapper<TjFlowingWater>() |
| | | .eq(TjFlowingWater::getOrderId, tjOrder.getOrderId()).eq(TjFlowingWater::getIsAddition, "N")); |
| | |
| | | return AjaxResult.error("身份证号码错误"); |
| | | } |
| | | } |
| | | // if(cusIdcard.length()==9){ |
| | | // if (!MatchUtils.cardValidates(cusIdcard)) { |
| | | // return AjaxResult.error("身份证号码错误"); |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import cn.hutool.core.io.FileUtil; |
| | | import com.ltkj.LtkjApplication; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.LtkjApplication;import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.hosp.domain.TjJcycxm; |
| | | import com.ltkj.hosp.idutil.IdUtils; |
| | | import jodd.util.StringUtil; |
| | |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | |
| | | |
| | | |
| | | /** |
| | | * @Author: 西安路泰科技有限公司/赵佳豪 |
| | | * @Date: 2022/12/12 9:05 |
| | |
| | | |
| | | } |
| | | |
| | | private static final String[] CHECK_INDEX = {"1", "0", "X", "9", "8", "7", "6", "5", "4", "3", "2"}; |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | |
| | | String s = "610124199809053678"; |
| | | String s1 = "610622199805230627"; |
| | | System.out.println(String.valueOf(MatchUtils.getAgeByIdCard(s))); |
| | | System.out.println(String.valueOf(MatchUtils.getAgeByIdCard(s1))); |
| | | String s = "62272219650528411X"; |
| | | System.out.println(isValidIdCard(s) ? "合法" : "非法"); |
| | | |
| | | } |
| | | |
| | | public static boolean isValidIdCard(String idCardNumber) { |
| | | // 正则表达式,匹配身份证号码的格式 |
| | | String regex = "(^\\d{15}$)|(^\\d{18}$)|(^\\d{17}(\\d|X|x)$)"; |
| | | Pattern pattern = Pattern.compile(regex); |
| | | Matcher matcher = pattern.matcher(idCardNumber); |
| | | |
| | | // 判断是否匹配身份证号码的格式 |
| | | if (!matcher.matches()) { |
| | | return false; |
| | | } |
| | | |
| | | // 验证身份证号码中的校验位 |
| | | if (idCardNumber.length() == 18) { |
| | | int[] weights = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2}; |
| | | char[] chars = idCardNumber.toCharArray(); |
| | | int sum = 0; |
| | | for (int i = 0; i < weights.length; i++) { |
| | | sum += (chars[i] - '0') * weights[i]; |
| | | } |
| | | char[] checkCodes = {'1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'}; |
| | | char checkCode = checkCodes[sum % 11]; |
| | | return chars[17] == checkCode || (chars[17] == 'x' && checkCode == 'X'); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 执行生成 |
| | |
| | | |
| | | @Select("SELECT * FROM tj_order WHERE tj_number = card_id ") |
| | | List<TjOrder> getOrderListBypiliangqiandaofasong(); |
| | | |
| | | |
| | | @Select("SELECT COUNT(*) FROM tj_order a WHERE a.deleted=0 AND " + |
| | | "(a.firm_id=#{compId} OR a.team_no=#{teamNo}) AND a.pac_id=#{pacId}") |
| | | Integer getTjTeamSelectRecordCount(@Param("teamNo") String teamNo,@Param("compId") String compId,@Param("pacId") String pacId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ltkj.hosp.domain.TjReservation; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | @Select("SELECT * FROM tj_reservation WHERE deleted = 1") |
| | | public List<TjReservation> selectTjReservationByDelete(); |
| | | |
| | | |
| | | @Select("SELECT * FROM (\n" + |
| | | "SELECT a.id_card,a.pac_id,a.company,a.company_id,a.team_no,a.grouping_id FROM tj_reservation a WHERE a.deleted=0 AND a.company_id=#{compId} \n" + |
| | | "UNION\n" + |
| | | "SELECT c.cus_idcard id_card, o.pac_id pac_id,o.firm_name company,o.firm_id company_id,o.firm_id team_no,IFNULL(o.pac_id,o.group_id) grouping_id FROM tj_order o " + |
| | | "JOIN tj_customer c ON c.cus_id=o.user_id WHERE o.deleted=0 AND o.firm_id=#{compId} AND o.tj_type=1 AND o.pac_id !=0) aa GROUP BY aa.id_card") |
| | | List<TjReservation> getFirimSfList(String compId); |
| | | |
| | | |
| | | @Select("SELECT * FROM (\n" + |
| | | "SELECT a.`name`,a.phoe,a.sex, a.id_card,a.pac_id,a.company,a.company_id,a.team_no,a.grouping_id FROM tj_reservation a " + |
| | | "WHERE a.deleted=0 AND (a.team_no=#{teamNo} or a.company_id=#{teamNo}) AND a.pac_id=#{pacId}\n" + |
| | | "UNION\n" + |
| | | "SELECT c.cus_name name,c.cus_phone phone,c.cus_sex sex,c.cus_idcard id_card, o.pac_id pac_id,o.firm_name company,o.firm_id company_id,o.order_id team_no,IFNULL(o.pac_id,o.group_id) grouping_id FROM " + |
| | | "tj_order o \n" + |
| | | "JOIN tj_customer c ON c.cus_id=o.user_id WHERE o.deleted=0" + |
| | | " AND (o.firm_id=(SELECT DISTINCT r.company_id FROM tj_reservation r " + |
| | | "WHERE r.deleted=0 AND ( r.team_no=#{teamNo} or r.company_id=#{teamNo})) or o.firm_id=#{teamNo}) \n" + |
| | | "AND o.tj_type=1 AND o.pac_id =#{pacId}) aa GROUP BY aa.id_card;") |
| | | List<TjReservation> getTeamTjPeopleList(@Param("teamNo") String teamNo,@Param("pacId") String pacId); |
| | | } |
| | |
| | | List<TjOrder> getOrderListBypiliangqiandaofasong(); |
| | | |
| | | |
| | | Integer getTjTeamSelectRecordCount(String teamNo, String compId, String pacId); |
| | | } |
| | |
| | | * @return 结果 |
| | | */ |
| | | public int deleteTjReservationById(Integer id); |
| | | |
| | | List<TjReservation> getFirimSfList(String compId); |
| | | |
| | | List<TjReservation> getTeamTjPeopleList(String teamNo, String pacId); |
| | | } |
| | |
| | | public List<TjOrder> getOrderListBypiliangqiandaofasong() { |
| | | return tjOrderMapper.getOrderListBypiliangqiandaofasong(); |
| | | } |
| | | |
| | | @Override |
| | | public Integer getTjTeamSelectRecordCount(String teamNo, String compId, String pacId) { |
| | | return tjOrderMapper.getTjTeamSelectRecordCount(teamNo, compId, pacId); |
| | | } |
| | | } |
| | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.Calendar; |
| | | import java.util.Collections; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | public int deleteTjReservationById(Integer id) { |
| | | return tjReservationMapper.deleteTjReservationById(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<TjReservation> getFirimSfList(String compId) { |
| | | return tjReservationMapper.getFirimSfList(compId); |
| | | } |
| | | |
| | | @Override |
| | | public List<TjReservation> getTeamTjPeopleList(String teamNo, String pacId) { |
| | | return tjReservationMapper.getTeamTjPeopleList(teamNo, pacId); |
| | | } |
| | | } |