| | |
| | | wrapper1.groupBy(TjProject::getProId); |
| | | List<TjProject> tjProjectList = projectService.list(wrapper1); |
| | | if(null != tjProjectList && !tjProjectList.isEmpty()){ |
| | | Map<String, List<TjProject>> listMap = tjProjectList.stream().collect(Collectors.groupingBy(TjProject::getSpecimenType)); |
| | | Map<String, List<TjProject>> listMap = tjProjectList.stream() |
| | | .collect(Collectors.groupingBy(p->p.getSpecimenType()+"_"+p.getYb())); |
| | | |
| | | log.info("分组后 ->{}",JSONUtil.toJsonStr(listMap)); |
| | | boolean save = lisApiMethod.save(listMap, tjOrder, customer); |
| | | if (!save) { |
| | |
| | | allPrice = tbTransitionMapper.getLisPriceByTjNumAndParentProId(tjOrder.getTjNumber(), sampling.getProId()); |
| | | } |
| | | lisSaveSqdxxDto.setFyje(allPrice.toString()); |
| | | lisSaveSqdxxDto.setYbbm(sampling.getSpecimenTypeCode()); |
| | | // lisSaveSqdxxDto.setYbbm(sampling.getSpecimenTypeCode()); |
| | | lisSaveSqdxxDto.setYbbm(sampling.getYb()); |
| | | |
| | | if (sampling.getIsMerge() == 1){ |
| | | LambdaQueryWrapper<TjSampling> wrapper = new LambdaQueryWrapper<>(); |
| | |
| | | BigDecimal allPrice = tbTransitionMapper.getLisPriceByTjNumAndInProId(tjOrder.getTjNumber(), entry.getValue().stream().map(TjProject::getProId).collect(Collectors.toList())); |
| | | |
| | | lisSaveSqdxxDto.setFyje(allPrice.toString()); |
| | | lisSaveSqdxxDto.setYbbm(entry.getKey()); |
| | | // lisSaveSqdxxDto.setYbbm(entry.getKey()); |
| | | String s = entry.getKey(); |
| | | lisSaveSqdxxDto.setYbbm(s.substring(s.indexOf("_") + 1)); |
| | | |
| | | |
| | | for (TjProject tjProject : entry.getValue()) { |
| | |
| | | else sampling.setJyxmdm(String.valueOf(project.getProId())); |
| | | sampling.setSpecimenTypeCode(project.getSpecimenType()); |
| | | sampling.setSpecimenType(dictLabel); |
| | | sampling.setYb(project.getYb()); |
| | | // LambdaQueryWrapper<LtkjJybbzd> wrapper = new LambdaQueryWrapper<>(); |
| | | // wrapper.eq(LtkjJybbzd::getJybbdm,jyxmzd.getJybbdm()); |
| | | // LtkjJybbzd jybbzd = jybbzdService.getOne(wrapper); |
| | |
| | | sampling.setJyxh(idUtils.generateLisID(lis_tmh_prefix)); |
| | | sampling.setSpecimenTypeCode(project1.getSpecimenType()); |
| | | sampling.setSpecimenType(dictLabel); |
| | | sampling.setYb(project.getYb()); |
| | | if (config.equals("Y") && lisAndPacsRegister) |
| | | sampling.setJyxmdm(project1.getLisXmbm()); |
| | | else sampling.setJyxmdm(String.valueOf(project1.getProId())); |
| | |
| | | String ysmc = configService.selectConfigByKey("request_default_ysmc"); |
| | | String lis_tmh_prefix = configService.selectConfigByKey("make_lis_tmh_prefix"); |
| | | List<TbTransition> detailList = transitionService.getBlTbTransitionListByCusId(customer.getCusIdcard(), cardId, jxbz); |
| | | Boolean useLisAndPacsRegister = lisApiMethod.isUseLisAndPacsRegister(order); |
| | | // Boolean useLisAndPacsRegister = lisApiMethod.isUseLisAndPacsRegister(order); |
| | | List<OutpinmedicapplyDetilsDto> outpinmedicapplyDetilsDtos = new ArrayList<>(); |
| | | if (useLisAndPacsRegister && isTuanTiPiao) { |
| | | if (isTuanTiPiao) { |
| | | // 检查申请 |
| | | pacsReg(order, customer, jianChaProjects); |
| | | LambdaQueryWrapper<TjSampling> wrapper = new LambdaQueryWrapper<>(); |
| | |
| | | List<TjSampling> list = tjSamplingService.list(wrapper); |
| | | log.info("采样数据 ->{}", JSONUtil.toJsonStr(list)); |
| | | if (!list.isEmpty()) { |
| | | Map<String, List<TjSampling>> listMap = list.stream().collect(Collectors.groupingBy(TjSampling::getSpecimenTypeCode)); |
| | | // Map<String, List<TjSampling>> listMap = list.stream().collect(Collectors.groupingBy(TjSampling::getSpecimenTypeCode)); |
| | | Map<String, List<TjSampling>> listMap = list.stream() |
| | | .collect(Collectors.groupingBy(p->p.getSpecimenTypeCode()+"_"+p.getYb())); |
| | | |
| | | log.info("分组后 ->{}", JSONUtil.toJsonStr(listMap)); |
| | | ArrayList<String> ids = new ArrayList<>(); |
| | | for (Map.Entry<String, List<TjSampling>> entry : listMap.entrySet()) { |
| | |
| | | // @PreAuthorize("@ss.hasPermi('system:notice:query')") |
| | | @GetMapping(value = "/{noticeId}") |
| | | public AjaxResult getInfo(@PathVariable Long noticeId) { |
| | | return success(noticeService.selectNoticeById(noticeId)); |
| | | SysNotice byId = noticeService.getById(noticeId); |
| | | LambdaQueryWrapper<SysNoticeUser> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(SysNoticeUser::getNoticeId, noticeId); |
| | | List<SysNoticeUser> sysNoticeUsers = sysNoticeUserService.list(wq); |
| | | if(null != sysNoticeUsers && !sysNoticeUsers.isEmpty()){ |
| | | List<String> longList = sysNoticeUsers.stream().map(i -> i.getUserId().toString()).collect(Collectors.toList()); |
| | | byId.setUserIds(longList); |
| | | } |
| | | return success(byId); |
| | | } |
| | | |
| | | /** |
| | |
| | | public AjaxResult add(@Validated @RequestBody SysNotice notice) { |
| | | notice.setCreateBy(getUsername()); |
| | | notice.setNoticeId(IdUtil.getSnowflake().nextId()); |
| | | int insertNotice = noticeService.insertNotice(notice); |
| | | if (insertNotice > 0){ |
| | | boolean insertNotice = noticeService.save(notice); |
| | | if (insertNotice){ |
| | | if (notice.getUserIds() == null || notice.getUserIds().isEmpty()){ |
| | | if (StrUtil.isBlank(notice.getDeptId())){ |
| | | notice.setUserIds(userService.list().stream().map(i -> String.valueOf(i.getUserId())).collect(Collectors.toList())); |
| | |
| | | @PutMapping |
| | | public AjaxResult edit(@Validated @RequestBody SysNotice notice) { |
| | | notice.setUpdateBy(getUsername()); |
| | | return toAjax(noticeService.updateNotice(notice)); |
| | | List<String> userIds = notice.getUserIds(); |
| | | if (noticeService.updateById(notice)) { |
| | | if(null !=userIds && !userIds.isEmpty()){ |
| | | LambdaQueryWrapper<SysNoticeUser> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(SysNoticeUser::getNoticeId, notice.getNoticeId()); |
| | | sysNoticeUserService.remove(wq); |
| | | for (String userId : userIds) { |
| | | SysNoticeUser user = new SysNoticeUser(); |
| | | user.setId(IdUtil.getSnowflake().nextId()); |
| | | user.setNoticeId(notice.getNoticeId()); |
| | | user.setUserId(Long.valueOf(userId)); |
| | | sysNoticeUserService.save(user); |
| | | } |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | /** |
| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import jodd.util.StringUtil; |
| | | import org.apache.commons.lang3.ArrayUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | |
| | | @GetMapping("/userListByDeptId") |
| | | public AjaxResult userListByDeptId(@RequestParam("deptId") String deptId){ |
| | | List<Long> deptIds = deptService.getDeptTreeById(deptId); |
| | | public AjaxResult userListByDeptId(@RequestParam(required = false) String deptId){ |
| | | |
| | | LambdaQueryWrapper<SysUser> wrapper = new LambdaQueryWrapper<>(); |
| | | if(StringUtil.isNotBlank(deptId)){ |
| | | List<Long> deptIds = deptService.getDeptTreeById(deptId); |
| | | wrapper.in(SysUser::getDeptId,deptIds); |
| | | } |
| | | return AjaxResult.success(userService.list(wrapper)); |
| | | } |
| | | |
| | |
| | | List<TjProject> tjProjectList = projectService.list(wq); |
| | | return success(tjProjectList); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/huoqutuantitaocanxiangmuList") |
| | | @ApiOperation(value = "获取所有单位团体套餐项目") |
| | | public AjaxResult huoqutuantitaocanxiangmuList(@RequestParam(required = false) String dwId) { |
| | | List<TjPackage> list= tjDwGroupingService.huoqutuantitaocanxiangmuhuoqutuantitaocanxiangmuList(dwId); |
| | | if (null !=list && !list.isEmpty()){ |
| | | for (TjPackage tjPackage : list) { |
| | | List<TjProject> res=new ArrayList<>(); |
| | | LambdaQueryWrapper<TjGroupingPro> wqq=new LambdaQueryWrapper<>(); |
| | | wqq.eq(TjGroupingPro::getGroupingId,tjPackage.getPacId()); |
| | | final List<TjGroupingPro> groupingProList = groupingProService.list(wqq); |
| | | if (null !=groupingProList && !groupingProList.isEmpty()){ |
| | | for (TjGroupingPro pro : groupingProList) { |
| | | final TjProject byId = projectService.getById(pro.getProId()); |
| | | if(null !=byId){ |
| | | res.add(byId); |
| | | } |
| | | } |
| | | tjPackage.setTjProjectList(res); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success(list); |
| | | } |
| | | } |
| | |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | |
| | | String s = "620821201106110016"; |
| | | System.out.println(String.valueOf(MatchUtils.getSexByIdCard(s))); |
| | | String s = "610124199809053678"; |
| | | String s1 = "610622199805230627"; |
| | | System.out.println(String.valueOf(MatchUtils.getAgeByIdCard(s))); |
| | | System.out.println(String.valueOf(MatchUtils.getAgeByIdCard(s1))); |
| | | |
| | | } |
| | | |
| | |
| | | @ApiModelProperty(value = "是否参与异常") |
| | | private Integer sfcyyc; |
| | | |
| | | |
| | | @ApiModelProperty(value = "样本") |
| | | private String yb; |
| | | |
| | | /** |
| | | * 子项目 |
| | | */ |
| | |
| | | private String specimenTypeCode; |
| | | |
| | | /** |
| | | * 样本 |
| | | */ |
| | | private String yb; |
| | | |
| | | /** |
| | | * 是否为合并项目 1是 0否 |
| | | */ |
| | | private Integer isMerge; |
| | |
| | | @Select("SELECT a.id pac_id,grouping_name pac_name,a.ys_price price , GROUP_CONCAT(b.pro_name ORDER BY b.pro_name) allProName FROM tj_dw_grouping a JOIN tj_grouping_pro b ON b.grouping_id=a.id \n" + |
| | | "WHERE a.deleted=0 and a.dw_id=#{dwId} AND (a.sex=#{sex} or a.sex=2) GROUP BY b.grouping_id") |
| | | List<TjPackage> huoqutuantitaocanxiangmu(@Param("dwId") String dwId,@Param("sex") Long sex); |
| | | |
| | | |
| | | // @Select("SELECT a.id pac_id,grouping_name pac_name,a.ys_price price , GROUP_CONCAT(b.pro_name ORDER BY b.pro_name) allProName FROM " + |
| | | // " tj_dw_grouping a JOIN tj_grouping_pro b ON b.grouping_id=a.id \n" + |
| | | // "WHERE a.deleted=0 and if(#{dwId}!=null,a.dw_id=#{dwId},1=1) GROUP BY b.grouping_id") |
| | | |
| | | List<TjPackage> huoqutuantitaocanxiangmuhuoqutuantitaocanxiangmuList(@Param("dwId") String dwId); |
| | | } |
| | |
| | | public int selectTjDwGroupingByDwId(String dwId); |
| | | |
| | | List<TjPackage> huoqutuantitaocanxiangmu(String dwId, Long sex); |
| | | |
| | | List<TjPackage> huoqutuantitaocanxiangmuhuoqutuantitaocanxiangmuList(String dwId); |
| | | |
| | | } |
| | |
| | | public List<TjPackage> huoqutuantitaocanxiangmu(String dwId, Long sex) { |
| | | return tjDwGroupingMapper.huoqutuantitaocanxiangmu(dwId,sex); |
| | | } |
| | | |
| | | @Override |
| | | public List<TjPackage> huoqutuantitaocanxiangmuhuoqutuantitaocanxiangmuList(String dwId) { |
| | | return tjDwGroupingMapper.huoqutuantitaocanxiangmuhuoqutuantitaocanxiangmuList(dwId); |
| | | } |
| | | } |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectTjDwGroupingVo"> |
| | | select id, dw_id, dw_name, dw_dept_id, dw_dept_name, grouping_name, limit, pac_name, pay_type, sex, gt_age, lt_age, create_by, update_time, update_by, deleted |
| | | select id, |
| | | dw_id, |
| | | dw_name, |
| | | dw_dept_id, |
| | | dw_dept_name, |
| | | grouping_name, |
| | | limit, |
| | | pac_name, |
| | | pay_type, |
| | | sex, |
| | | gt_age, |
| | | lt_age, |
| | | create_by, |
| | | update_time, |
| | | update_by, |
| | | deleted |
| | | from tj_dw_grouping |
| | | </sql> |
| | | |
| | |
| | | resultMap="TjDwGroupingResult"> |
| | | <include refid="selectTjDwGroupingVo"/> |
| | | where id = #{id} |
| | | </select> |
| | | <select id="huoqutuantitaocanxiangmuhuoqutuantitaocanxiangmuList" parameterType="string" |
| | | resultType="com.ltkj.hosp.domain.TjPackage"> |
| | | SELECT a.id pac_id,grouping_name pac_name,a.ys_price price , GROUP_CONCAT(b.pro_name ORDER BY b.pro_name) |
| | | allProName FROM |
| | | tj_dw_grouping a JOIN tj_grouping_pro b ON b.grouping_id=a.id |
| | | <where> |
| | | <if test="dwId != null" > |
| | | and a.dw_id = #{dwId} |
| | | </if> |
| | | and a.deleted=0 GROUP BY b.grouping_id |
| | | </where> |
| | | |
| | | </select> |
| | | |
| | | <insert id="insertTjDwGrouping" parameterType="TjDwGrouping"> |
| | |
| | | |
| | | <delete id="deleteTjDwGroupingById" parameterType="String"> |
| | | delete |
| | | from tj_dw_grouping where id = #{id} |
| | | from tj_dw_grouping |
| | | where id = #{id} |
| | | </delete> |
| | | |
| | | <delete id="deleteTjDwGroupingByIds" parameterType="String"> |
| | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Size; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.ltkj.tduck.handler.LongToStringSerializer; |
| | | import org.apache.commons.lang3.builder.ToStringBuilder; |
| | | import org.apache.commons.lang3.builder.ToStringStyle; |
| | | import com.ltkj.common.core.domain.BaseEntity; |
| | |
| | | /** |
| | | * 公告ID |
| | | */ |
| | | @TableId |
| | | @JsonSerialize(using = LongToStringSerializer.class) |
| | | private Long noticeId; |
| | | |
| | | /** |
| | |
| | | */ |
| | | private String status; |
| | | |
| | | @TableField(exist = false) |
| | | // @TableField(exist = false) |
| | | private String deptId; |
| | | |
| | | @TableField(exist = false) |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ltkj.system.domain.SysNotice; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | * |
| | | * @author ltkj |
| | | */ |
| | | public interface SysNoticeMapper { |
| | | public interface SysNoticeMapper extends BaseMapper<SysNotice> { |
| | | /** |
| | | * 查询公告信息 |
| | | * |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import com.ltkj.system.domain.SysNotice; |
| | | |
| | |
| | | * |
| | | * @author ltkj |
| | | */ |
| | | public interface ISysNoticeService { |
| | | public interface ISysNoticeService extends IService<SysNotice> { |
| | | /** |
| | | * 查询公告信息 |
| | | * |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ltkj.common.core.domain.AjaxResult; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | * @author ltkj |
| | | */ |
| | | @Service |
| | | public class SysNoticeServiceImpl implements ISysNoticeService { |
| | | public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper,SysNotice> implements ISysNoticeService { |
| | | @Autowired |
| | | private SysNoticeMapper noticeMapper; |
| | | |