32 files modified
17 files added
| | |
| | | @Override |
| | | public ResultBody baseDownLoad(Map<String, Object> map) throws Exception { |
| | | String urlDiZhi=MapUtils.getString(map,"url"); |
| | | if(!urlDiZhi.contains(DOMAIN)){ |
| | | if(!urlDiZhi.contains(DOMAIN)&&!urlDiZhi.contains(DOMAIN.replace("https","http"))){ |
| | | ByteArrayOutputStream outPut = new ByteArrayOutputStream(); |
| | | byte[] data = new byte[1024]; |
| | | try { |
| | |
| | | List<FileInfo> fileInfos = baseMapper.selectByMap(map); |
| | | if (fileInfos.size() > 0) { |
| | | FileInfo fileInfo = fileInfos.get(0); |
| | | OSSObject down = this.down(fileInfo.getUrl().replace(DOMAIN, "")); |
| | | OSSObject down = this.down(fileInfo.getUrl().replace(DOMAIN, "").replace(DOMAIN.replace("https","http"),"")); |
| | | InputStream objectContent = down.getObjectContent(); |
| | | //返回Base64编码过的字节数组字符串 |
| | | byte[] data = null; |
New file |
| | |
| | | package com.kidgrow.oprationcenter.feign; |
| | | |
| | | import com.kidgrow.common.constant.ServiceNameConstants; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.oprationcenter.feign.fallback.ScreeningOrganizatonServiceFallbackFactory; |
| | | import com.kidgrow.oprationcenter.model.ScreeningOrganizationInfo; |
| | | import com.kidgrow.ribbon.config.FeignHttpInterceptorConfig; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/11/16 15:54 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | */ |
| | | @FeignClient(value = ServiceNameConstants.OPRATION_SERVER,configuration= FeignHttpInterceptorConfig.class, |
| | | fallbackFactory = ScreeningOrganizatonServiceFallbackFactory.class, decode404 = true) |
| | | public interface SreeningOrganizationService { |
| | | /** |
| | | * feign rpc访问远程 接口 |
| | | */ |
| | | @PostMapping(value = "/screeningorganizationinfo/query") |
| | | ResultBody findByObject(@RequestBody ScreeningOrganizationInfo organizationInfo); |
| | | } |
New file |
| | |
| | | package com.kidgrow.oprationcenter.feign.fallback; |
| | | |
| | | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.oprationcenter.feign.SreeningOrganizationService; |
| | | import com.kidgrow.oprationcenter.model.ScreeningOrganizationInfo; |
| | | import feign.hystrix.FallbackFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/11/16 15:58 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | */ |
| | | @Component |
| | | public class ScreeningOrganizatonServiceFallbackFactory implements FallbackFactory<SreeningOrganizationService> { |
| | | |
| | | @Override |
| | | public SreeningOrganizationService create(Throwable throwable) { |
| | | return new SreeningOrganizationService(){ |
| | | |
| | | @Override |
| | | public ResultBody findByObject(ScreeningOrganizationInfo organizationInfo) { |
| | | return ResultBody.failed().msg("saveProductDetail的FeignClient调用失败"); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | package com.kidgrow.oprationcenter.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.NoArgsConstructor; |
| | | import org.hibernate.validator.constraints.NotEmpty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | |
| | | /** |
| | | * 是否删除,1删除,0未删除 |
| | | */ |
| | | @TableLogic |
| | | @NotEmpty(message = "是否删除,1删除,0未删除不能为空") |
| | | private Boolean isDel; |
| | | /** |
| | | * 租户字段 |
| | | */ |
| | | private String tenantId; |
| | | private int isDel; |
| | | /** |
| | | * 状态,1启用,0停用 |
| | | */ |
| | | @NotEmpty(message = "状态,1启用,0停用不能为空") |
| | | private Boolean enabled; |
| | | private int enabled; |
| | | |
| | | /** |
| | | * 是否关闭筛查推送 ,0否,1是 |
| | | */ |
| | | private int isScreeningPush; |
| | | |
| | | /** |
| | | * 推送标题 |
| | | */ |
| | | private String pushTitle; |
| | | |
| | | /** |
| | | * 推送描述 |
| | | */ |
| | | private String pushDescription; |
| | | |
| | | /** |
| | | * 推送背景图片 |
| | | */ |
| | | private String pushBackImage; |
| | | |
| | | /** |
| | | * 微站首页中间位置图片 |
| | | */ |
| | | private String homePage; |
| | | } |
New file |
| | |
| | | package com.kidgrow.oprationcenter.model; |
| | | |
| | | import cn.afterturn.easypoi.excel.annotation.Excel; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @version 1.0 |
| | | * @Description: 筛查机构信息表<br> |
| | | * @Project: 用户中心<br> |
| | | * @CreateDate: Created in 2020-10-12 17:10:31 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | */ |
| | | @Data |
| | | public class ScreeningOrganizationExcel implements Serializable { |
| | | private static final long serialVersionUID = -5886012896705137070L; |
| | | |
| | | /** |
| | | * 机构名称 |
| | | */ |
| | | @Excel(name = "机构名称", height = 20, width = 30, isImportField = "true_st") |
| | | private String organizationName; |
| | | /** |
| | | * 联系人 |
| | | */ |
| | | @Excel(name = "联系人", height = 20, width = 30, isImportField = "true_st") |
| | | private String contactName; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @Excel(name = "电话", height = 20, width = 30, isImportField = "true_st") |
| | | private String contactNumber; |
| | | /** |
| | | * 机构简称 |
| | | */ |
| | | @Excel(name = "机构简称", height = 20, width = 30, isImportField = "true_st") |
| | | private String abbreviation; |
| | | |
| | | /** |
| | | * 机构编码 |
| | | */ |
| | | @Excel(name = "编码", height = 20, width = 30, isImportField = "true_st") |
| | | private String organizationNo; |
| | | } |
New file |
| | |
| | | package com.kidgrow.oprationcenter.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.kidgrow.common.model.SuperModel; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @version 1.0 |
| | | * @Description: 筛查机构信息表<br> |
| | | * @Project: 用户中心<br> |
| | | * @CreateDate: Created in 2020-10-12 17:10:31 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @TableName("screening_organization_info") |
| | | public class ScreeningOrganizationInfo extends SuperModel { |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 省 |
| | | */ |
| | | private String province; |
| | | /** |
| | | * 市 |
| | | */ |
| | | private String city; |
| | | /** |
| | | * 区 |
| | | */ |
| | | private String area; |
| | | /** |
| | | * 机构名称 |
| | | */ |
| | | private String organizationName; |
| | | /** |
| | | * 联系人 |
| | | */ |
| | | private String contactName; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | private String contactNumber; |
| | | /** |
| | | * 医院ID |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long sourceHospitalId; |
| | | /** |
| | | * 医院名称 |
| | | */ |
| | | private String sourceHospitalName; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remarks; |
| | | /** |
| | | * 机构简称 |
| | | */ |
| | | private String abbreviation; |
| | | /** |
| | | * 机构二维码地址 |
| | | */ |
| | | private String qrCode; |
| | | /** |
| | | * 社区 |
| | | */ |
| | | private String community; |
| | | /** |
| | | * 机构编码 |
| | | */ |
| | | private String organizationNo; |
| | | /** |
| | | * 区域code |
| | | */ |
| | | private String areaCode; |
| | | |
| | | /** |
| | | * 上一级 |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long parentId; |
| | | |
| | | /** |
| | | * 等级 |
| | | */ |
| | | private int orgLevel; |
| | | } |
| | |
| | | package com.kidgrow.oprationcenter.mapper; |
| | | |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | import com.kidgrow.db.mapper.SuperMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.db.mapper.SuperMapper; |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return HospitalScreening对象 |
| | | */ |
| | | HospitalScreening findByObject(@Param("p") HospitalScreening hospitalScreening); |
| | | |
| | | /** |
| | | * 根据医院名称模糊查询医院数据列表 |
| | | * @param hospitalName |
| | | * @return |
| | | */ |
| | | List<HospitalScreening> findByName(@Param("hospitalName") String hospitalName); |
| | | } |
New file |
| | |
| | | package com.kidgrow.oprationcenter.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.db.mapper.SuperMapper; |
| | | import com.kidgrow.oprationcenter.model.ScreeningOrganizationInfo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * @Description: 筛查机构信息表<br> |
| | | * @Project: 用户中心<br> |
| | | * @CreateDate: Created in 2020-10-12 17:10:31 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | * @version 1.0 |
| | | */ |
| | | public interface ScreeningOrganizationInfoMapper extends SuperMapper<ScreeningOrganizationInfo> { |
| | | /** |
| | | * 分页查询筛查机构信息表列表 |
| | | * @param page |
| | | * @param params |
| | | * @return |
| | | */ |
| | | List<ScreeningOrganizationInfo> findList(Page<ScreeningOrganizationInfo> page, @Param("p") Map<String, Object> params); |
| | | |
| | | /** |
| | | * 根据OrganizationInfo对象当做查询条件进行查询 |
| | | * @param organizationInfo |
| | | * @return OrganizationInfo对象 |
| | | */ |
| | | ScreeningOrganizationInfo findByObject(@Param("p") ScreeningOrganizationInfo organizationInfo); |
| | | } |
| | |
| | | package com.kidgrow.oprationcenter.service; |
| | | |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.service.ISuperService; |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | |
| | | import java.util.Map; |
| | | |
| | |
| | | * @return HospitalScreening对象 |
| | | */ |
| | | HospitalScreening findByObject(HospitalScreening hospitalScreening); |
| | | |
| | | /** |
| | | * 状态变更 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | ResultBody updateEnabled(Map<String, Object> params); |
| | | |
| | | /** |
| | | * 根据医院名称模糊查询医院数据列表 |
| | | * @param hospitalName |
| | | * @return |
| | | */ |
| | | ResultBody<HospitalScreening> findByName(String hospitalName); |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.kidgrow.oprationcenter.service; |
| | | |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.service.ISuperService; |
| | | import com.kidgrow.oprationcenter.model.ScreeningOrganizationInfo; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * @Description: 筛查机构信息表<br> |
| | | * @Project: 用户中心<br> |
| | | * @CreateDate: Created in 2020-10-12 17:10:31 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | * @version 1.0 |
| | | */ |
| | | public interface IScreeningOrganizationInfoService extends ISuperService<ScreeningOrganizationInfo> { |
| | | /** |
| | | * 列表 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | PageResult<ScreeningOrganizationInfo> findList(Map<String, Object> params); |
| | | |
| | | |
| | | /** |
| | | * 根据OrganizationInfo对象当做查询条件进行查询 |
| | | * @param organizationInfo |
| | | * @return OrganizationInfo对象 |
| | | */ |
| | | ScreeningOrganizationInfo findByObject(ScreeningOrganizationInfo organizationInfo); |
| | | } |
| | | |
| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.oprationcenter.mapper.HospitalScreeningMapper; |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | import com.kidgrow.oprationcenter.service.IHospitalScreeningService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | import com.kidgrow.oprationcenter.mapper.HospitalScreeningMapper; |
| | | import com.kidgrow.oprationcenter.service.IHospitalScreeningService; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | |
| | | public HospitalScreening findByObject(HospitalScreening hospitalScreening){ |
| | | return baseMapper.findByObject(hospitalScreening); |
| | | } |
| | | |
| | | /** |
| | | * 更新状态:推送装填,启停状态 |
| | | * @param params 包含:1、type:0推送,1启停 |
| | | * 2、ID :ID |
| | | * 3、val:对用的值 |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultBody updateEnabled(Map<String, Object> params) { |
| | | int type = MapUtils.getInteger(params,"type"); |
| | | int val = MapUtils.getInteger(params,"objVal"); |
| | | long id = MapUtils.getLong(params,"objId"); |
| | | |
| | | HospitalScreening hospitalScreening = baseMapper.selectById(id); |
| | | |
| | | if(hospitalScreening == null){ |
| | | return ResultBody.failed("医院数据不存在!"); |
| | | } |
| | | |
| | | switch (type){ |
| | | case 0: |
| | | hospitalScreening.setIsScreeningPush(val); |
| | | break; |
| | | case 1: |
| | | hospitalScreening.setEnabled(val); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | |
| | | int count = baseMapper.updateById(hospitalScreening); |
| | | |
| | | return count > 0 ? ResultBody.ok().msg("更新成功") : ResultBody.failed("更新失败"); |
| | | } |
| | | |
| | | /** |
| | | * 根据医院名称模糊查询医院数据列表 |
| | | * @param hospitalName |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultBody<HospitalScreening> findByName(String hospitalName) { |
| | | return ResultBody.ok().data(baseMapper.findByName(hospitalName)).msg("查询成功"); |
| | | } |
| | | } |
New file |
| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.oprationcenter.mapper.ScreeningOrganizationInfoMapper; |
| | | import com.kidgrow.oprationcenter.model.ScreeningOrganizationInfo; |
| | | import com.kidgrow.oprationcenter.service.IScreeningOrganizationInfoService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * @Description: 筛查机构信息表<br> |
| | | * @Project: 用户中心<br> |
| | | * @CreateDate: Created in 2020-10-12 17:10:31 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | * @version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class ScreeningOrganizationInfoServiceImpl extends SuperServiceImpl<ScreeningOrganizationInfoMapper, ScreeningOrganizationInfo> implements IScreeningOrganizationInfoService { |
| | | /** |
| | | * 列表 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageResult<ScreeningOrganizationInfo> findList(Map<String, Object> params){ |
| | | Page<ScreeningOrganizationInfo> page = new Page<>(MapUtils.getInteger(params, "page"), MapUtils.getInteger(params, "limit")); |
| | | List<ScreeningOrganizationInfo> list = baseMapper.findList(page, params); |
| | | return PageResult.<ScreeningOrganizationInfo>builder().data(list).code(0).count(page.getTotal()).build(); |
| | | } |
| | | |
| | | /** |
| | | * 根据OrganizationInfo对象当做查询条件进行查询 |
| | | * @param organizationInfo |
| | | * @return OrganizationInfo |
| | | */ |
| | | @Override |
| | | public ScreeningOrganizationInfo findByObject(ScreeningOrganizationInfo organizationInfo){ |
| | | return baseMapper.findByObject(organizationInfo); |
| | | } |
| | | |
| | | } |
| | |
| | | <if test="p.isDel != null and p.isDel !=''"> |
| | | and is_del = #{p.isDel} |
| | | </if> |
| | | <if test="p.tenantId != null and p.tenantId !=''"> |
| | | and tenant_id = #{p.tenantId} |
| | | </if> |
| | | <if test="p.enabled != null and p.enabled !=''"> |
| | | and enabled = #{p.enabled} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="p.updateUserName != null and p.updateUserName !=''"> |
| | | and update_user_name = #{p.updateUserName} |
| | | </if> |
| | | <if test="p.isScreeningPush != null and p.isScreeningPush !=''"> |
| | | and is_screening_push = #{p.isScreeningPush} |
| | | </if> |
| | | <if test="p.pushTitle != null and p.pushTitle !=''"> |
| | | and push_title = #{p.pushTitle} |
| | | </if> |
| | | <if test="p.pushDescription != null and p.pushDescription !=''"> |
| | | and push_description = #{p.pushDescription} |
| | | </if> |
| | | <if test="p.pushBackImage != null and p.pushBackImage !=''"> |
| | | and push_back_image = #{p.pushBackImage} |
| | | </if> |
| | | <if test="p.homePage != null and p.homePage !=''"> |
| | | and home_page = #{p.homePage} |
| | | </if> |
| | | </where> |
| | | </sql> |
| | |
| | | <include refid="where"/> |
| | | order by id desc |
| | | </select> |
| | | |
| | | <select id="findByName" resultType="com.kidgrow.oprationcenter.model.HospitalScreening"> |
| | | select id, |
| | | hospital_name |
| | | from hospital_screening |
| | | where is_del=0 and enabled=1 and hospital_name LIKE concat('%',#{hospitalName},'%') |
| | | order by hospital_name desc,id desc |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <!--筛查机构信息表--> |
| | | <mapper namespace="com.kidgrow.oprationcenter.mapper.ScreeningOrganizationInfoMapper"> |
| | | <!--定义查询列--> |
| | | <sql id="Column_List"> |
| | | |
| | | * |
| | | |
| | | </sql> |
| | | |
| | | <!--sql查询片段--> |
| | | <sql id="where"> |
| | | <where> |
| | | <!--查询条件自行添加--> |
| | | <if test="p.id != null and p.id != ''"> |
| | | and id = #{p.id} |
| | | </if> |
| | | <if test="p.province != null and p.province != ''"> |
| | | and province = #{p.province} |
| | | </if> |
| | | <if test="p.city != null and p.city != ''"> |
| | | and city = #{p.city} |
| | | </if> |
| | | <if test="p.area != null and p.area != ''"> |
| | | and area = #{p.area} |
| | | </if> |
| | | <if test="p.organizationName != null and p.organizationName != ''"> |
| | | and organization_name = #{p.organizationName} |
| | | </if> |
| | | <if test="p.contactName != null and p.contactName != ''"> |
| | | and contact_name = #{p.contactName} |
| | | </if> |
| | | <if test="p.contactNumber != null and p.contactNumber != ''"> |
| | | and contact_number = #{p.contactNumber} |
| | | </if> |
| | | <if test="p.sourceHospitalId != null and p.sourceHospitalId != ''"> |
| | | and source_hospital_id = #{p.sourceHospitalId} |
| | | </if> |
| | | <if test="p.sourceHospitalName != null and p.sourceHospitalName != ''"> |
| | | and source_hospital_name = #{p.sourceHospitalName} |
| | | </if> |
| | | <if test="p.remarks != null and p.remarks != ''"> |
| | | and remarks = #{p.remarks} |
| | | </if> |
| | | <if test="p.createTime != null and p.createTime != ''"> |
| | | and create_time = #{p.createTime} |
| | | </if> |
| | | <if test="p.abbreviation != null and p.abbreviation != ''"> |
| | | and abbreviation = #{p.abbreviation} |
| | | </if> |
| | | <if test="p.qrCode != null and p.qrCode != ''"> |
| | | and qr_code = #{p.qrCode} |
| | | </if> |
| | | <if test="p.community != null and p.community != ''"> |
| | | and community = #{p.community} |
| | | </if> |
| | | <if test="p.organizationNo != null and p.organizationNo != ''"> |
| | | and organization_no = #{p.organizationNo} |
| | | </if> |
| | | <if test="p.createUserId != null and p.createUserId != ''"> |
| | | and create_user_id = #{p.createUserId} |
| | | </if> |
| | | <if test="p.updateTime != null and p.updateTime != ''"> |
| | | and update_time = #{p.updateTime} |
| | | </if> |
| | | <if test="p.updateUserId != null and p.updateUserId != ''"> |
| | | and update_user_id = #{p.updateUserId} |
| | | </if> |
| | | <if test="p.areaCode != null and p.areaCode != ''"> |
| | | and area_code = #{p.areaCode} |
| | | </if> |
| | | <if test="p.parentId != null and p.parentId != ''"> |
| | | and parent_id = #{p.parentId} |
| | | </if> |
| | | <if test="p.orgLevel != null and p.orgLevel != ''"> |
| | | and org_level = #{p.orgLevel} |
| | | </if> |
| | | </where> |
| | | </sql> |
| | | |
| | | <!--定义根据-OrganizationInfo当作查询条件返回对象--> |
| | | <select id="findByObject" resultType="com.kidgrow.oprationcenter.model.ScreeningOrganizationInfo"> |
| | | select |
| | | <include refid="Column_List"/> |
| | | from screening_organization_info |
| | | <include refid="where"/> |
| | | order by id desc |
| | | limit 1 |
| | | |
| | | </select> |
| | | |
| | | <!--定义根据-OrganizationInfo当作查询条件返回对象集合--> |
| | | <select id="findList" resultType="com.kidgrow.oprationcenter.model.ScreeningOrganizationInfo"> |
| | | select |
| | | <include refid="Column_List"/> |
| | | from screening_organization_info |
| | | <include refid="where"/> |
| | | order by id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.kidgrow.oprationcenter.controller; |
| | | |
| | | import java.util.Map; |
| | | import com.kidgrow.common.controller.BaseController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.ObjectError; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | import com.kidgrow.oprationcenter.service.IHospitalScreeningService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import com.kidgrow.oprationcenter.model.HospitalScreening; |
| | | import com.kidgrow.oprationcenter.service.IHospitalScreeningService; |
| | | import com.kidgrow.common.model.*; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.validation.ObjectError; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | |
| | | /** |
| | |
| | | @ApiImplicitParam(name = "limit", value = "分页结束位置", required = true, dataType = "Integer") |
| | | }) |
| | | @GetMapping |
| | | public ResultBody<PageResult> list(@RequestParam Map<String, Object> params) { |
| | | public PageResult<HospitalScreening> list(@RequestParam Map<String, Object> params) { |
| | | if(params.size()==0){ |
| | | params.put("page",1); |
| | | params.put("limit",10); |
| | | } |
| | | return ResultBody.ok().data(hospitalScreeningService.findList(params)); |
| | | return hospitalScreeningService.findList(params); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | return ResultBody.failed().msg(errMsg.toString()); |
| | | } else { |
| | | if(hospitalScreening.getId() == null){ |
| | | HospitalScreening hs = new HospitalScreening(); |
| | | hs.setHospitalId(hospitalScreening.getHospitalId()); |
| | | HospitalScreening byObject = hospitalScreeningService.findByObject(hs); |
| | | if(byObject != null){ |
| | | return ResultBody.failed().msg("该医院已添加"); |
| | | } |
| | | } |
| | | boolean v= hospitalScreeningService.saveOrUpdate(hospitalScreening); |
| | | if(v) { |
| | | return ResultBody.ok().data(hospitalScreening).msg("保存成功"); |
| | |
| | | return ResultBody.failed().msg("删除失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * |
| | | * @param params |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "修改反馈数据状态") |
| | | @GetMapping("/updateEnabled") |
| | | public ResultBody updateEnabled(@RequestParam Map<String, Object> params) { |
| | | if (params.size() == 0) { |
| | | return ResultBody.failed().msg("参数异常!"); |
| | | } |
| | | return hospitalScreeningService.updateEnabled(params); |
| | | } |
| | | |
| | | /** |
| | | * 查询 |
| | | */ |
| | | @ApiOperation(value = "查询") |
| | | @GetMapping("/findByName") |
| | | public ResultBody findByName(@RequestParam String hospitalName) { |
| | | if (!hospitalName.isEmpty()) { |
| | | return ResultBody.ok().data(hospitalScreeningService.findByName(hospitalName).getData()).msg("查询成功"); |
| | | } else { |
| | | return ResultBody.ok().data(null).msg(""); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.kidgrow.oprationcenter.controller; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.http.HttpRequest; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.kidgrow.common.controller.BaseController; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.utils.ExcelUtil; |
| | | import com.kidgrow.common.utils.QRCodeUtil; |
| | | import com.kidgrow.oprationcenter.model.ScreeningOrganizationExcel; |
| | | import com.kidgrow.oprationcenter.model.ScreeningOrganizationInfo; |
| | | import com.kidgrow.oprationcenter.service.IScreeningOrganizationInfoService; |
| | | import com.kidgrow.redis.util.RedisUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.validation.ObjectError; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import sun.misc.BASE64Decoder; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.*; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: 筛查机构信息表 |
| | | * @Project: 用户中心 |
| | | * @CreateDate: Created in 2020-10-12 17:10:31 <br> |
| | | * @Author: <a href="78125310@kidgrow.com">dougang</a> |
| | | * @version: 1.0 |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/screeningorganizationinfo") |
| | | @Api(tags = "筛查机构信息表") |
| | | public class ScreeningOrganizationInfoController extends BaseController { |
| | | @Autowired |
| | | private IScreeningOrganizationInfoService organizationInfoService; |
| | | |
| | | @Autowired |
| | | private RedisUtils redisUtils; |
| | | |
| | | private final String URL = "url"; |
| | | |
| | | /** |
| | | * 列表 |
| | | */ |
| | | @ApiOperation(value = "查询列表") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "page", value = "分页起始位置", required = true, dataType = "Integer"), |
| | | @ApiImplicitParam(name = "limit", value = "分页结束位置", required = true, dataType = "Integer") |
| | | }) |
| | | @GetMapping |
| | | public PageResult<ScreeningOrganizationInfo> list(@RequestParam Map<String, Object> params) { |
| | | if (params.size() == 0) { |
| | | params.put("page", 1); |
| | | params.put("limit", 10); |
| | | } |
| | | return organizationInfoService.findList(params); |
| | | } |
| | | |
| | | /** |
| | | * 查询 |
| | | */ |
| | | @ApiOperation(value = "查询") |
| | | @GetMapping("/{organizationId}") |
| | | public ResultBody findById(@PathVariable String organizationId) { |
| | | ScreeningOrganizationInfo model = organizationInfoService.getById(organizationId); |
| | | return ResultBody.ok().data(model).msg("查询成功"); |
| | | } |
| | | |
| | | /** |
| | | * 根据OrganizationInfo当做查询条件进行查询 |
| | | */ |
| | | @ApiOperation(value = "根据OrganizationInfo当做查询条件进行查询") |
| | | @PostMapping("/query") |
| | | public ResultBody findByObject(@RequestBody ScreeningOrganizationInfo organizationInfo) { |
| | | ScreeningOrganizationInfo model = organizationInfoService.findByObject(organizationInfo); |
| | | return ResultBody.ok().data(model).msg("查询成功"); |
| | | } |
| | | |
| | | /** |
| | | * 新增or更新 |
| | | */ |
| | | @ApiOperation(value = "保存") |
| | | @PostMapping |
| | | public ResultBody save(@Valid @RequestBody ScreeningOrganizationInfo organizationInfo, BindingResult bindingResult) { |
| | | List<String> errMsg = new ArrayList<>(); |
| | | if (bindingResult.hasErrors()) { |
| | | for (ObjectError error : bindingResult.getAllErrors()) { |
| | | errMsg.add(error.getDefaultMessage()); |
| | | } |
| | | return ResultBody.failed().msg(errMsg.toString()); |
| | | } else { |
| | | if (organizationInfo.getId() == null) { |
| | | //新增机构增加关注二维码 |
| | | String url = createQr(String.valueOf(organizationInfo.getId())); |
| | | if (StringUtils.isNotBlank(url)) { |
| | | organizationInfo.setQrCode(url); |
| | | } |
| | | } |
| | | boolean v = organizationInfoService.saveOrUpdate(organizationInfo); |
| | | if (v) { |
| | | return ResultBody.ok().data(organizationInfo).msg("保存成功"); |
| | | } else { |
| | | return ResultBody.failed().msg("保存失败"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private String createQr(String id) { |
| | | String url = ""; |
| | | String str = "{\"action_name\": \"QR_LIMIT_STR_SCENE\", \"action_info\": {\"scene\": {\"scene_str\": \"kagscreening_\" " + id + "}}}"; |
| | | |
| | | String token = redisUtils.get("Wechat:Token:KagReceiveToken").toString(); |
| | | String result = HttpRequest.post("https://api.weixin.qq.com/cgi-bin/qrcode/create?access_token=" + token) |
| | | .header("Content-Type", "application/json") |
| | | .body(str).execute().body(); |
| | | |
| | | |
| | | if (StringUtils.isBlank(result)) { |
| | | return url; |
| | | } |
| | | |
| | | JSONObject strJson = JSONObject.parseObject(result); |
| | | if (strJson.containsKey(URL)) { |
| | | url = strJson.getString("url"); |
| | | } |
| | | |
| | | return url; |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | */ |
| | | @ApiOperation(value = "删除") |
| | | @DeleteMapping("/{id}") |
| | | public ResultBody delete(@PathVariable String organizationId) { |
| | | boolean v = organizationInfoService.removeById(organizationId); |
| | | if (v) { |
| | | return ResultBody.ok().msg("删除成功"); |
| | | } else { |
| | | return ResultBody.failed().msg("删除失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 下载二维码 |
| | | */ |
| | | @ApiOperation(value = "下载二维码") |
| | | @PostMapping("/downLoad") |
| | | public void downLoad(@RequestBody Map<String, Object> param, HttpServletResponse response) { |
| | | OutputStream out = null; |
| | | InputStream fileInputStream = null; |
| | | try { |
| | | String base64Str = QRCodeUtil.creatRrCode(MapUtils.getString(param, "url"), 258, 258, 3); |
| | | String fileName = MapUtils.getString(param, "no") + ".png"; |
| | | |
| | | BASE64Decoder dencoder = new BASE64Decoder(); |
| | | byte[] arr = dencoder.decodeBuffer(base64Str.split(",")[1]); |
| | | |
| | | // 设置输出的格式 |
| | | response.reset(); |
| | | response.setContentType("application/x-msdownload"); |
| | | response.addHeader("Content-Length", "" + arr.length); |
| | | response.addHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\""); |
| | | |
| | | out = response.getOutputStream(); |
| | | fileInputStream = new ByteArrayInputStream(arr); |
| | | int len = 0; |
| | | byte[] by = new byte[1024 * 10]; |
| | | while ((len = fileInputStream.read(by)) > 0) { |
| | | out.write(by, 0, len); |
| | | } |
| | | |
| | | } catch (Exception w) { |
| | | log.error("", w); |
| | | } finally { |
| | | try { |
| | | out.close(); |
| | | fileInputStream.close(); |
| | | } catch (Exception w) { |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 导入文件 |
| | | */ |
| | | @ApiOperation(value = "导入") |
| | | @PostMapping("/import") |
| | | public ResultBody downLoad(@RequestParam("file") MultipartFile excel, |
| | | @RequestParam("hospitalId") String hospitalId, |
| | | @RequestParam("areaCode") String areaCode, |
| | | @RequestParam("areaName") String areaName, |
| | | @RequestParam("hospitalName") String hospitalName) { |
| | | |
| | | int rowNum = 0; |
| | | |
| | | try { |
| | | if (!excel.isEmpty()) { |
| | | List<ScreeningOrganizationExcel> list = ExcelUtil.importExcel(excel, 0, 1, ScreeningOrganizationExcel.class); |
| | | rowNum = list.size(); |
| | | if (rowNum > 0) { |
| | | List<ScreeningOrganizationInfo> users = new ArrayList<>(rowNum); |
| | | String[] area = areaCode.split("#"); |
| | | |
| | | list.forEach(u -> { |
| | | ScreeningOrganizationInfo user = new ScreeningOrganizationInfo(); |
| | | BeanUtil.copyProperties(u, user); |
| | | user.setSourceHospitalName(hospitalName); |
| | | user.setSourceHospitalId(Long.parseLong(hospitalId)); |
| | | user.setProvince(area[0]); |
| | | user.setCity(area[1]); |
| | | user.setArea(area[2]); |
| | | user.setAreaCode(areaName); |
| | | users.add(user); |
| | | }); |
| | | organizationInfoService.saveBatch(users); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("导入失败", e); |
| | | } |
| | | return ResultBody.ok().msg("导入数据成功,一共【" + rowNum + "】行"); |
| | | } |
| | | |
| | | /** |
| | | * 下载模板 |
| | | */ |
| | | @ApiOperation(value = "下载模板") |
| | | @PostMapping("/export") |
| | | public void export(HttpServletResponse response) { |
| | | try { |
| | | InputStream inStream =this.getClass().getResourceAsStream("/static/pages/template/机构导入模板.xlsx"); |
| | | // 设置输出的格式 |
| | | response.reset(); |
| | | response.setContentType("bin"); |
| | | response.addHeader("Content-Disposition", "attachment; filename=机构导入模板.xlsx"); |
| | | // 循环取出流中的数据 |
| | | byte[] b = new byte[100]; |
| | | int len; |
| | | |
| | | while ((len = inStream.read(b)) > 0) { |
| | | response.getOutputStream().write(b, 0, len); |
| | | } |
| | | inStream.close(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | |
| | | - saas_client_pay |
| | | - pay_manager |
| | | - equipment_docking |
| | | - hospital_screening |
| | | - screening_organization_info |
| | | ignoreSqls: |
| | | - com.kidgrow.usercenter.mapper.SysRoleMapper.findAll |
| | | - com.kidgrow.oprationcenter.mapper.ConsumptionRecordMapper.findDetailList |
| | |
| | | package com.kidgrow.usercenter.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.kidgrow.common.model.SuperModel; |
| | |
| | | import org.hibernate.validator.constraints.NotEmpty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | |
| | | * 是否单次支付 1是0否 |
| | | */ |
| | | private Boolean isPay; |
| | | /** |
| | | * 运动处方 1是0否 |
| | | */ |
| | | private Boolean isHealth; |
| | | |
| | | /** |
| | | * 运动处方服务生效时间 |
| | | */ |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | private Date healthBeginTime; |
| | | /** |
| | | * 运动处方服务结束时间 |
| | | */ |
| | | @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") |
| | | private Date healthEndTime; |
| | | } |
| | |
| | | * @return 如果返回空则视为不存在 |
| | | */ |
| | | String checkDepartmentName(Long hosId,String departmentName); |
| | | /** |
| | | *运动处方调用 是否开通服务 |
| | | */ |
| | | ResultBody getHealth(SysDepartment sysDepartment); |
| | | } |
| | | |
| | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysOrganization; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.common.utils.DateUtils; |
| | | import com.kidgrow.usercenter.mapper.SysDepartmentMapper; |
| | | import com.kidgrow.usercenter.model.SysDepartment; |
| | | import com.kidgrow.usercenter.model.SysHospital; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | String departName=baseMapper.checkDepartmentName(hosId,departmentName); |
| | | return departName; |
| | | } |
| | | |
| | | @Override |
| | | public ResultBody getHealth(SysDepartment sysDepartment) { |
| | | SysDepartment department = baseMapper.selectById(sysDepartment.getId()); |
| | | if(department==null){ |
| | | return ResultBody.failed("该数据为空"); |
| | | }else { |
| | | if(department.getIsHealth()){ |
| | | Date now= new Date(); |
| | | Date endDate = DateUtils.addDays(department.getHealthEndTime(), 1); |
| | | if(now.getTime()<department.getHealthBeginTime().getTime()){ |
| | | department.setIsHealth(false); |
| | | return ResultBody.ok().data(department); |
| | | }else if(department.getHealthBeginTime().getTime()<=now.getTime()&&now.getTime()<=endDate.getTime()){ |
| | | return ResultBody.ok().data(department); |
| | | }else if(endDate.getTime()<now.getTime()) { |
| | | department.setIsHealth(false); |
| | | return ResultBody.ok().data(department); |
| | | } |
| | | return ResultBody.ok(); |
| | | }else { |
| | | return ResultBody.ok().data(false); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.kidgrow.usercenter.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.kidgrow.common.annotation.LoginUser; |
| | | import com.kidgrow.common.controller.BaseController; |
| | | import com.kidgrow.common.model.PageResult; |
| | |
| | | public ResultBody findListByHospitalId(@RequestParam Map<String, Object> params) { |
| | | return sysDepartmentService.findListByHospitalId(params); |
| | | } |
| | | @PostMapping |
| | | public ResultBody update(@RequestBody SysDepartment sysDepartment){ |
| | | if(sysDepartment.getId()==null){ |
| | | return ResultBody.failed("请输入id"); |
| | | } |
| | | QueryWrapper queryWrapper =new QueryWrapper(); |
| | | queryWrapper.eq("id",sysDepartment.getId()); |
| | | boolean update = sysDepartmentService.update(sysDepartment, queryWrapper); |
| | | if(update){ |
| | | return ResultBody.ok(); |
| | | }else { |
| | | return ResultBody.failed("更新数据失败"); |
| | | } |
| | | } |
| | | /** |
| | | *运动处方调用 是否开通服务 |
| | | */ |
| | | |
| | | @PostMapping("getHealth") |
| | | public ResultBody getHealth(@RequestBody SysDepartment sysDepartment){ |
| | | if(sysDepartment.getId()==null){ |
| | | return ResultBody.failed("请输入id"); |
| | | } |
| | | return sysDepartmentService.getHealth(sysDepartment); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.kidgrow.common.constant; |
| | | |
| | | public interface HealthConstant { |
| | | /** |
| | | * 调用运动处方的加盐方式 |
| | | */ |
| | | public static final String HEALTH_KEY = "xg~!@753159"; |
| | | } |
| | |
| | | */ |
| | | String BONEAGE_EVALUATION_SERVER="boneage-evaluationcenter-server"; |
| | | |
| | | /** |
| | | * C端筛查中心服务名 |
| | | */ |
| | | String CUSTOMER_SCREENINGCENTER_SERVER="customer-screeningcenter-server"; |
| | | |
| | | /** |
| | | * C端用户中心服务名 |
| | | */ |
| | | String CUSTOMER_USERCENTER_SERVER="customer-usercenter-server"; |
| | | |
| | | /** |
| | | * C端报表中心服务名 |
| | | */ |
| | | String CUSTOMER_REPORTCENTER_SERVER="customer-reportcenter-server"; |
| | | |
| | | } |
| | |
| | | ## C\u7AEF\u4EA7\u54C1\u516C\u4F17\u53F7\u914D\u7F6E\u4FE1\u606F |
| | | wechat.xigao.mp.appid=dev-wx1cc7074ce3014652 |
| | | wechat.xigao.mp.secret=dev-0fa9eb188ae52aa8c2380744109f161c |
| | | wechat.xigao.mp.token=c83AR9oqRAJNg83A |
| | | |
| | | ## C\u7AEF\u4EA7\u54C1\u53EF\u7231\u9AD8\u7B5B\u67E5\u5C0F\u7A0B\u5E8F\u914D\u7F6E\u4FE1\u606F |
| | | wechat.screening.applets.appid=wx5a9bc7ebd13eb6cc |
| | |
| | | tenantId=hospital.toString(); |
| | | List<SysOrganization> organizations = (List<SysOrganization>) user.getOrganizations(); |
| | | //将组织数据 存到header 里面 |
| | | organizations.sort((e1,e2)->e1.getOrgLevel().compareTo(e2.getOrgLevel())); |
| | | if (organizations != null&&organizations.size()>0) { |
| | | organizations.sort((e1,e2)->e1.getOrgLevel().compareTo(e2.getOrgLevel())); |
| | | ctx.addZuulRequestHeader(SecurityConstants.USER_ORG_ID_HEADER,String.valueOf(organizations.get(0).getId())); |
| | | ctx.addZuulRequestHeader(SecurityConstants.USER_ORGS_HEADER,JSON.toJSONString(organizations)); |
| | | } |
| | |
| | | - /api-record/DiagnosticUnfinishedFegin/equipmentList |
| | | - /api-record/DiagnosticUnfinishedFegin/equipmentUpload |
| | | - /api-opration/wxController/getOpenId |
| | | - /api-record/DiagnosticUnfinishedFegin/recordChildInterworking |
| | | # - /api-user/syshospital/findAllByMap |
| | | # - /api-user/sysdictionaries/findAll |
| | | # - /api-user/sysdepartment/findListByHospitalId |
| | |
| | | /api-opration/alipay/notify, |
| | | /api-record/DiagnosticUnfinishedFegin/equipmentList, |
| | | /api-record/DiagnosticUnfinishedFegin/equipmentUpload, |
| | | /api-opration/wxController/getOpenId |
| | | /api-opration/wxController/getOpenId, |
| | | /api-record/DiagnosticUnfinishedFegin/recordChildInterworking |
| | | # /api-user/syshospital/findAllByMap, |
| | | # /api-user/sysdictionaries/findAll, |
| | | # /api-user/sysdepartment/findListByHospitalId |
| | |
| | | // var my_api_server_url = 'http://127.0.0.1:8888/'; |
| | | var my_api_server_url = 'http://127.0.0.1:8888/'; |
| | | // var my_api_server_url = 'http://192.168.2.240:8888/'; |
| | | //var my_api_server_url = 'http://open.zuul.kidgrow.cloud/'; |
| | | // var my_api_server_url = 'zuul.kidgrow.cloud/'; |
| | | var my_api_server_url = 'https://zuul.kidgrow.cloud/'; |
| | | //var my_api_server_url = 'https://zuul.kidgrow.cloud/'; |
| | | |
| | | if(my_api_server_url.indexOf("http")<0) |
| | | { |
New file |
| | |
| | | <form id="app-form-add" lay-filter="app-form-add" class="layui-form model-form"> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;">所在医院</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="sourceHospitalName" id="sourceHospitalName" placeholder="请输入医院名称" type="text" class="layui-input" |
| | | maxlength="50" lay-verify="required" required style="width: 150px;"/> |
| | | <input type="hidden" name="sourceHospitalId" id="sourceHospitalId"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" style="width: 75px;">所在区域</label> |
| | | <div class="layui-inline" style="width: 134px;"> |
| | | <select lay-verify="required" required id="OrganizationProvince" placeholder="省份" |
| | | lay-filter="OrganizationProvince" > |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline" style="width: 134px;"> |
| | | <select id="OrganizationCity" lay-verify="required" required placeholder="市" lay-filter="OrganizationCity"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline" style="width: 134px;"> |
| | | <select id="OrganizationArea" lay-verify="required" required placeholder="区县" lay-filter="OrganizationArea"> |
| | | <option value="">选择区县</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;">文件上传</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <button class="layui-btn test" id="import">选择文件</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item model-form-footer"> |
| | | <button class="layui-btn" type="button" id="downLoadTemplate" >下载导入模板</button> |
| | | <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button> |
| | | </div> |
| | | </form> |
| | | |
| | | <script> |
| | | layui.use(['form', 'laydate', 'util', 'config', 'admin', 'autocomplete', 'area'], function () { |
| | | var form = layui.form; |
| | | var config = layui.config; |
| | | var autocomplete = layui.autocomplete; |
| | | var $ = layui.jquery; |
| | | var area = layui.area; |
| | | var upload = layui.upload; |
| | | |
| | | form.render(); |
| | | |
| | | //省份数据加载 |
| | | area.areaData("#OrganizationProvince", 1, "", ""); |
| | | |
| | | //装载市区数据 |
| | | form.on("select(OrganizationProvince)", function (data) { |
| | | area.areasClear("#OrganizationArea", 3); |
| | | area.areaData("#OrganizationCity", 2, data.value, ""); |
| | | }); |
| | | //装载区县数据 |
| | | form.on("select(OrganizationCity)", function (data) { |
| | | area.areaData("#OrganizationArea", 3, data.value, ""); |
| | | }); |
| | | |
| | | //自动完成-医院名称 |
| | | autocomplete.render({ |
| | | elem: $('#sourceHospitalName')[0], |
| | | keywordsName: 'hospitalName', //查询关键字名称 |
| | | url: config.base_server + 'api-opration/hospitalscreening/findByName', |
| | | template_val: '{{d.hospitalName}}', //选择后文本框显示的数据字段 |
| | | template_txt: "<div class='layui-table-cell'>{{d.hospitalName}}</div>", //下拉列表模板 |
| | | onselect: function (resp) { |
| | | $("#sourceHospitalId").val(resp.id); |
| | | } |
| | | }); |
| | | |
| | | upload.render({ |
| | | //绑定元素 |
| | | elem: '#import' |
| | | //上传接口 |
| | | ,url: config.base_server + 'api-opration/screeningorganizationinfo/import' |
| | | ,before: function(obj){ //obj参数包含的信息,跟 choose回调完全一致,可参见上文。 |
| | | layer.load(); //上传loading |
| | | } |
| | | ,done: function(data){ |
| | | layer.closeAll("loading"); |
| | | //上传完毕回调 |
| | | if (0 === data.code) { |
| | | layer.closeAll(); |
| | | parent.layui.table.reload('app-table', {}); |
| | | } else { |
| | | layer.msg(data.msg, { icon: 2, time: 2000 }); |
| | | } |
| | | } |
| | | ,error: function(){ |
| | | //请求异常回调 |
| | | layer.msg("操作异常", { icon: 2, time: 2000 }); |
| | | } |
| | | //允许的文件类型 |
| | | ,accept:'file' |
| | | ,exts: 'xls|xlsx' |
| | | //选择文件后是否自动上传 |
| | | ,auto: true, |
| | | headers: { |
| | | "Authorization": "Bearer " + config.getToken().access_token |
| | | } |
| | | ,data: { |
| | | hospitalId: function(){ |
| | | return $('#sourceHospitalId').val(); |
| | | }, |
| | | areaCode:function(){ |
| | | return $('#OrganizationProvince').val() + "#" + $('#OrganizationCity').val() + "#" + |
| | | $('#OrganizationArea').val(); |
| | | }, |
| | | areaName:function(){ |
| | | return $("#OrganizationProvince option:selected").text() + $("#OrganizationCity option:selected").text()+ |
| | | $("#OrganizationArea option:selected").text(); |
| | | }, |
| | | hospitalName:function(){ |
| | | return $("#sourceHospitalName").val(); |
| | | } |
| | | } |
| | | |
| | | |
| | | }); |
| | | |
| | | $('#downLoadTemplate').click(function () { |
| | | var url = config.base_server + "api-opration/screeningorganizationinfo/export"; |
| | | // 获取XMLHttpRequest |
| | | var xmlResquest = new XMLHttpRequest(); |
| | | // 发起请求 |
| | | xmlResquest.open("POST", url, true); |
| | | // 设置请求头类型 |
| | | xmlResquest.setRequestHeader("Content-type", "application/json"); |
| | | xmlResquest.setRequestHeader("Authorization","Bearer " + config.getToken().access_token); |
| | | xmlResquest.responseType = "blob"; |
| | | |
| | | // 返回 |
| | | xmlResquest.onload = function() { |
| | | if (this.status == 200) { |
| | | var fileName = "机构导入模板.xlsx"; |
| | | var blob = this.response; |
| | | var a = document.createElement('a'); |
| | | a.innerHTML = fileName; |
| | | // 指定生成的文件名 |
| | | a.download = fileName; |
| | | a.href = URL.createObjectURL(blob); |
| | | document.body.appendChild(a); |
| | | var evt = document.createEvent("MouseEvents"); |
| | | evt.initEvent("click", false, false); |
| | | a.dispatchEvent(evt); |
| | | document.body.removeChild(a); |
| | | } |
| | | }; |
| | | xmlResquest.send(); |
| | | }); |
| | | }); |
| | | </script> |
New file |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header"> |
| | | <h2 class="header-title">筛查医院管理</h2> |
| | | <span class="layui-breadcrumb pull-right"> |
| | | <a href="#!home_console">首页</a> |
| | | <a><cite>筛查医院管理</cite></a> |
| | | </span> |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline" style="margin-bottom: -25px;"> |
| | | <select id="enabled" lay-filter="role_clients"> |
| | | <option value="">医院状态</option> |
| | | <option value="1">启用</option> |
| | | <option value="0">停用</option> |
| | | </select> |
| | | <select id="isScreeningPush" lay-filter="role_clients"> |
| | | <option value="">推送状态</option> |
| | | <option value="1">是</option> |
| | | <option value="0">否</option> |
| | | </select> |
| | | <input name="hospitalName" id="hospitalName-seach" placeholder="按医院名称" type="text" |
| | | class="layui-input search-input" maxlength="50" autocomplete="off"/>  |
| | | </div> |
| | | <button id="app-btn-search" class="layui-btn icon-btn" layt="abc"><i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button id="screeningHospital-btn-add" class="layui-btn icon-btn"><i class="layui-icon"></i>添加筛查医院 |
| | | </button> |
| | | <!-- 数据表格 --> |
| | | <table class="layui-table" id="app-table" lay-filter="app-table"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <input id="hospitalId" type="hidden"/> |
| | | <!-- 表格操作列 --> |
| | | |
| | | <script type="text/html" id="doctor-table-bar"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改 |
| | | </button> |
| | | <button class="layui-btn layui-btn-xs" lay-event="downLoad"> |
| | | 下载二维码 |
| | | </button> |
| | | </script> |
| | | |
| | | <script type="text/html" id="hospital-push-state"> |
| | | <input type="checkbox" lay-filter="hospital-push-state" value="{{d.id}}" |
| | | lay-skin="switch" lay-text="是|否" {{d.isScreeningPush==1?'checked':''}}/> |
| | | </script> |
| | | |
| | | <script type="text/html" id="hospital-state"> |
| | | <input type="checkbox" lay-filter="hospital-state" value="{{d.id}}" |
| | | lay-skin="switch" lay-text="正常|停用" {{d.enabled==1?'checked':''}}/> |
| | | </script> |
| | | |
| | | <script> |
| | | layui.use(['form', 'table', 'laydate', 'util', 'config', 'upload', 'admin', 'autocomplete', 'formSelects'], |
| | | function () { |
| | | var form = layui.form; |
| | | var table = layui.table; |
| | | var config = layui.config; |
| | | var layer = layui.layer; |
| | | var util = layui.util; |
| | | var admin = layui.admin; |
| | | var autocomplete = layui.autocomplete; |
| | | var formSelects = layui.formSelects; |
| | | var $ = layui.jquery; |
| | | |
| | | //自动完成-医院名称 |
| | | autocomplete.render({ |
| | | elem: $('#hospitalName-seach')[0], |
| | | keywordsName: 'hospitalName', //查询关键字名称 |
| | | url: config.base_server + 'api-opration/hospitalscreening/findByName', |
| | | template_val: '{{d.hospitalName}}', //选择后文本框显示的数据字段 |
| | | template_txt: "<div class='layui-table-cell'>{{d.hospitalName}}</div>", //下拉列表模板 |
| | | onselect: function (resp) { |
| | | $("#hospitalId").val(resp.id); |
| | | } |
| | | }); |
| | | |
| | | // 渲染表格 |
| | | table.render({ |
| | | elem: '#app-table', |
| | | url: config.base_server + 'api-opration/hospitalscreening', |
| | | method: 'GET', |
| | | headers: { |
| | | 'Authorization': 'Bearer ' + config.getToken().access_token |
| | | }, |
| | | page: true, |
| | | cols: [ |
| | | [{ |
| | | field: 'hospitalId', |
| | | width: "150", |
| | | title: '医院ID', |
| | | fixed: 'left' |
| | | }, { |
| | | field: 'hospitalName', |
| | | width: "200", |
| | | title: '医院名称', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | field: 'isScreeningPush', |
| | | width: "120", |
| | | title: '推送状态', |
| | | align: 'center', |
| | | fixed: 'left', |
| | | templet: '#hospital-push-state' |
| | | }, |
| | | { |
| | | field: 'enabled', |
| | | width: "100", |
| | | title: '状态', |
| | | align: 'center', |
| | | fixed: 'left', |
| | | templet: '#hospital-state' |
| | | }, |
| | | { |
| | | field: 'createTime', |
| | | width: "150", |
| | | sort: true, |
| | | align: 'center', |
| | | title: '创建时间', |
| | | templet: "<div>{{layui.util.toDateString(d.createTime, 'yyyy/MM/dd HH:mm')}}</div>" |
| | | }, |
| | | { |
| | | width: "300", |
| | | align: 'center', |
| | | toolbar: '#doctor-table-bar', |
| | | title: '操作', |
| | | fixed: 'right' |
| | | } |
| | | ] |
| | | ], |
| | | done: function (res, curr, count) { |
| | | permissionsInput(res, config); |
| | | } |
| | | }); |
| | | |
| | | // 修改状态 |
| | | form.on('switch(hospital-push-state)', function (obj) { |
| | | layer.load(2); |
| | | admin.req('api-opration/hospitalscreening/updateEnabled', { |
| | | objId: obj.elem.value, |
| | | objVal: obj.elem.checked ? 1 : 0, |
| | | type: 0 |
| | | }, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |
| | | layer.msg(data.msg, { |
| | | icon: 1, |
| | | time: 2000 |
| | | }); |
| | | } else { |
| | | layer.msg(data.msg, { |
| | | icon: 2, |
| | | time: 2000 |
| | | }); |
| | | $(obj.elem).prop('checked', !obj.elem.checked); |
| | | form.render('checkbox'); |
| | | } |
| | | }, 'GET'); |
| | | }); |
| | | |
| | | // 修改状态 |
| | | form.on('switch(hospital-state)', function (obj) { |
| | | layer.load(2); |
| | | admin.req('api-opration/hospitalscreening/updateEnabled', { |
| | | objId: obj.elem.value, |
| | | objVal: obj.elem.checked ? 1 : 0, |
| | | type: 1 |
| | | }, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |
| | | layer.msg(data.msg, { |
| | | icon: 1, |
| | | time: 2000 |
| | | }); |
| | | } else { |
| | | layer.msg(data.msg, { |
| | | icon: 2, |
| | | time: 2000 |
| | | }); |
| | | $(obj.elem).prop('checked', !obj.elem.checked); |
| | | form.render('checkbox'); |
| | | } |
| | | }, 'GET'); |
| | | }); |
| | | |
| | | // 搜索按钮点击事件 |
| | | $('#app-btn-search').click(function () { |
| | | var enabled = $('#enabled').val(); |
| | | var isScreeningPush = $("#isScreeningPush").val(); |
| | | var hospitalName = $('#hospitalName-seach').val(); |
| | | table.reload('app-table', { |
| | | where: { |
| | | enabled: enabled, |
| | | hospitalName: hospitalName, |
| | | isScreeningPush: isScreeningPush, |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 添加按钮点击事件 |
| | | $('#screeningHospital-btn-add').click(function () { |
| | | showEditModel_add("添加"); |
| | | }); |
| | | |
| | | var showEditModel_add = function (title, data) { |
| | | admin.putTempData('t_screeningHospital', data); |
| | | admin.popupCenter({ |
| | | title: title, |
| | | path: 'pages/keaigao/screeningHospital_form.html', |
| | | area: '600px', |
| | | offset: '0px', |
| | | finish: function () { |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // 工具条点击事件 |
| | | table.on('tool(app-table)', function (obj) { |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | if (layEvent === 'downLoad') { |
| | | // 下载二维码 |
| | | downLoad(data.hospitalQrImage); |
| | | } else if (layEvent === 'edit') { |
| | | showEditModel_add("编辑", data); |
| | | } |
| | | }); |
| | | |
| | | function downLoad(url) { |
| | | window.open(url); |
| | | } |
| | | |
| | | }); |
| | | </script> |
New file |
| | |
| | | <form id="app-form-add" lay-filter="app-form-add" class="layui-form model-form"> |
| | | <input name="id" type="hidden"/> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;">所在医院</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="hospitalName" id="hospitalName" placeholder="请输入医院名称" type="text" class="layui-input" |
| | | maxlength="50" lay-verify="required" required style="width: 150px;"/> |
| | | <input type="hidden" name="hospitalId" id="hospitalId"/> |
| | | <input type="hidden" name="id" id="id"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 67px;">推送筛查</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="isScreeningPush" id="isScreeningPush_yes" type="radio" value="1" title="是" |
| | | class="layui-input"/> |
| | | <input name="isScreeningPush" id="isScreeningPush_no" type="radio" checked value="0" title="否" |
| | | class="layui-input"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">推送标题</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <textarea name="pushTitle" id="pushTitle" placeholder="请输入推送标题" lay-verify="required" required class="layui-textarea" |
| | | style="width:99%;height:100px"></textarea> |
| | | |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 68px;">推送描述</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <textarea name="pushDescription" id="pushDescription" lay-verify="required" required placeholder="请输入推送描述" class="layui-textarea" |
| | | style="width:99%;height:100px"></textarea> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">上传二维码</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <button type="button" class="layui-btn" id="qr"> |
| | | <i class="layui-icon"></i>上传图片 |
| | | </button> |
| | | <input name="hospitalQrImage" id="hospitalQrImage" type="hidden" class="layui-input" maxlength="20"/> |
| | | <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;"> |
| | | 预览效果 |
| | | <div class="layui-upload-list" id="qrImage"></div> |
| | | </blockquote> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">微站首页图片</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <button type="button" class="layui-btn" id="phonto"> |
| | | <i class="layui-icon"></i>上传图片 |
| | | </button> |
| | | <input name="homePage" id="homePage" type="hidden" class="layui-input" maxlength="20"/> |
| | | <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;"> |
| | | 预览效果 |
| | | <div class="layui-upload-list" id="indexImage"></div> |
| | | </blockquote> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="layui-form-item model-form-footer"> |
| | | <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button> |
| | | <button class="layui-btn" id="sure" lay-filter="screeningHospital-form-submit" |
| | | lay-submit>保存 |
| | | </button> |
| | | </div> |
| | | </form> |
| | | |
| | | <script> |
| | | layui.use(['form', 'laydate', 'util', 'config', 'admin', 'autocomplete', 'formSelects'], function () { |
| | | var form = layui.form; |
| | | var config = layui.config; |
| | | var layer = layui.layer; |
| | | var util = layui.util; |
| | | var admin = layui.admin; |
| | | var upload = layui.upload; |
| | | var autocomplete = layui.autocomplete; |
| | | var formSelects = layui.formSelects; |
| | | var $ = layui.jquery; |
| | | |
| | | form.render(); |
| | | |
| | | // 表单提交事件 |
| | | form.on('submit(screeningHospital-form-submit)', function (data) { |
| | | data.field.hospitalId = $("#hospitalId").val(); |
| | | data.field.hospitalName = $("#hospitalName").val(); |
| | | data.field.pushTitle = $("#pushTitle").val(); |
| | | data.field.pushDescription = $("#pushDescription").val(); |
| | | data.field.enabled = "1"; |
| | | |
| | | layer.load(2); |
| | | admin.req('api-opration/hospitalscreening', JSON.stringify(data.field), function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |
| | | layer.closeAll(); |
| | | parent.layui.table.reload('app-table', {}); |
| | | } else { |
| | | layer.msg(data.msg, { |
| | | icon: 2, |
| | | time: 3000 |
| | | }); |
| | | } |
| | | }, "POST"); |
| | | return false; |
| | | }); |
| | | |
| | | //自动完成-医院名称 |
| | | autocomplete.render({ |
| | | elem: $('#hospitalName')[0], |
| | | keywordsName: 'hospitalName', //查询关键字名称 |
| | | url: config.base_server + 'api-user/syshospital/findByName', |
| | | template_val: '{{d.hospitalName}}', //选择后文本框显示的数据字段 |
| | | template_txt: "<div class='layui-table-cell'>{{d.hospitalName}}</div>", //下拉列表模板 |
| | | onselect: function (resp) { |
| | | $("#hospitalId").val(resp.id); |
| | | } |
| | | }); |
| | | //上传二维码 |
| | | upload.render({ |
| | | elem: '#qr', |
| | | url: config.base_server + 'api-file/files-anon', |
| | | accept: 'file', |
| | | auto: true, |
| | | headers: { |
| | | "Authorization": "Bearer " + config.getToken().access_token |
| | | }, |
| | | before: function (obj) { |
| | | layer.load(); //上传loading |
| | | //预读本地文件示例,不支持ie8 |
| | | obj.preview(function (index, file, result) { |
| | | $("#qrImage").html(''); |
| | | $('#qrImage').append('<img src="' + result + |
| | | '" width="50px" height="50px" alt="' + file.name + |
| | | '" class="layui-upload-img">') |
| | | }); |
| | | }, |
| | | done: function (data) { |
| | | layer.closeAll('loading'); |
| | | $("#hospitalQrImage").val(data.url); |
| | | }, |
| | | error: function (data) { |
| | | layer.closeAll('loading'); |
| | | } |
| | | }); |
| | | //微站首页图片 |
| | | upload.render({ |
| | | elem: '#phonto', |
| | | url: config.base_server + 'api-file/files-anon', |
| | | accept: 'file', |
| | | auto: true, |
| | | headers: { |
| | | "Authorization": "Bearer " + config.getToken().access_token |
| | | }, |
| | | before: function (obj) { |
| | | layer.load(); //上传loading |
| | | //预读本地文件示例,不支持ie8 |
| | | obj.preview(function (index, file, result) { |
| | | $("#indexImage").html(''); |
| | | $('#indexImage').append('<img src="' + result + |
| | | '" width="50px" height="50px" alt="' + file.name + |
| | | '" class="layui-upload-img">') |
| | | }); |
| | | }, |
| | | done: function (data) { |
| | | layer.closeAll('loading'); |
| | | $("#homePage").val(data.url); |
| | | }, |
| | | error: function (data) { |
| | | layer.closeAll('loading'); |
| | | } |
| | | }); |
| | | |
| | | var screeningHospital = admin.getTempData('t_screeningHospital'); |
| | | if(screeningHospital){ |
| | | $("#hospitalName").val(screeningHospital.hospitalName); |
| | | $("#hospitalId").val(screeningHospital.hospitalId); |
| | | $("#id").val(screeningHospital.id); |
| | | $("#pushTitle").val(screeningHospital.pushTitle); |
| | | $("#pushDescription").val(screeningHospital.pushDescription); |
| | | |
| | | if (screeningHospital.isScreeningPush == 1) { |
| | | $("#isScreeningPush_yes").prop("checked", true) |
| | | } else { |
| | | $('#isScreeningPush_no').prop("checked", true) |
| | | } |
| | | |
| | | $("#hospitalQrImage").val(screeningHospital.hospitalQrImage); |
| | | $('#qrImage').append('<img src="' + screeningHospital.hospitalQrImage + |
| | | '" width="50px" height="50px" class="layui-upload-img">'); |
| | | |
| | | $("#homePage").val(screeningHospital.homePage); |
| | | $('#indexImage').append('<img src="' + screeningHospital.homePage + |
| | | '" width="50px" height="50px" class="layui-upload-img">'); |
| | | |
| | | form.render(); |
| | | } |
| | | }); |
| | | </script> |
New file |
| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header"> |
| | | <h2 class="header-title">筛查机构管理</h2> |
| | | <span class="layui-breadcrumb pull-right"> |
| | | <a href="#!home_console">首页</a> |
| | | <a><cite>筛查机构管理</cite></a> |
| | | </span> |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <select id="province" placeholder="省份" lay-filter="province"> |
| | | </select> |
| | | <select id="city" placeholder="市" lay-filter="city"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | <select id="areas" placeholder="区县" lay-filter="areas"> |
| | | <option value="">选择区县</option> |
| | | </select> |
| | | <input name="hospitalName" id="hospitalName-seach" placeholder="按机构名称" type="text" |
| | | class="layui-input search-input" maxlength="50" autocomplete="off"/>  |
| | | </div> |
| | | <button id="app-btn-search" class="layui-btn icon-btn" layt="abc"><i class="layui-icon"></i>搜索 |
| | | </button> |
| | | <button id="screeningOrganization-btn-add" class="layui-btn icon-btn"><i class="layui-icon"></i>添加筛查机构 |
| | | </button> |
| | | <button id="screeningOrganization-btn-import" class="layui-btn icon-btn"><i class="layui-icon"></i>导入筛查机构 |
| | | </button> |
| | | <table class="layui-table" id="app-table" lay-filter="app-table"></table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <input id="hospitalId" type="hidden"/> |
| | | <!-- 表格操作列 --> |
| | | |
| | | <script type="text/html" id="doctor-table-bar"> |
| | | <button class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改 |
| | | </button> |
| | | <button class="layui-btn layui-btn-xs" lay-event="downLoad"> |
| | | 下载二维码 |
| | | </button> |
| | | </script> |
| | | |
| | | <script> |
| | | layui.use(['form', 'table', 'laydate', 'util', 'config', 'upload', 'admin', 'autocomplete', 'formSelects','area'], |
| | | function () { |
| | | var form = layui.form; |
| | | var table = layui.table; |
| | | var config = layui.config; |
| | | var admin = layui.admin; |
| | | var $ = layui.jquery; |
| | | var area = layui.area; |
| | | |
| | | //省份数据加载 |
| | | area.areaData("#province", 1, "", ""); |
| | | |
| | | //装载市区数据 |
| | | form.on("select(province)", function (data) { |
| | | area.areasClear("#areas", 3); |
| | | area.areaData("#city", 2, data.value, ""); |
| | | }); |
| | | |
| | | //装载区县数据 |
| | | form.on("select(city)", function (data) { |
| | | area.areaData("#areas", 3, data.value, ""); |
| | | }); |
| | | |
| | | // 渲染表格 |
| | | table.render({ |
| | | elem: '#app-table', |
| | | url: config.base_server + 'api-opration/screeningorganizationinfo', |
| | | method: 'GET', |
| | | headers: { |
| | | 'Authorization': 'Bearer ' + config.getToken().access_token |
| | | }, |
| | | page: true, |
| | | cols: [ |
| | | [{ |
| | | field: 'organizationNo', |
| | | width: "100", |
| | | title: '机构编码', |
| | | fixed: 'left', |
| | | },{ |
| | | field: 'organizationName', |
| | | width: "150", |
| | | title: '机构名称', |
| | | align: 'center', |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | field: 'abbreviation', |
| | | width: "150", |
| | | title: '机构简称', |
| | | align: 'center', |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | field: 'sourceHospitalName', |
| | | width: "150", |
| | | align: 'center', |
| | | title: '所属医院', |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | field: 'areaCode', |
| | | width: "200", |
| | | align: 'center', |
| | | title: '所属区域', |
| | | fixed: 'left', |
| | | }, |
| | | { |
| | | field: 'contactName', |
| | | width: "150", |
| | | sort: true, |
| | | align: 'center', |
| | | title: '联系人', |
| | | }, |
| | | { |
| | | field: 'contactNumber', |
| | | width: "150", |
| | | sort: true, |
| | | align: 'center', |
| | | title: '联系电话', |
| | | }, |
| | | { |
| | | field: 'remarks', |
| | | width: "250", |
| | | sort: true, |
| | | align: 'center', |
| | | title: '说明', |
| | | }, |
| | | { |
| | | width: "200", |
| | | align: 'center', |
| | | toolbar: '#doctor-table-bar', |
| | | title: '操作', |
| | | fixed: 'right' |
| | | } |
| | | ] |
| | | ], |
| | | done: function (res, curr, count) { |
| | | permissionsInput(res, config); |
| | | } |
| | | }); |
| | | |
| | | |
| | | // 搜索按钮点击事件 |
| | | $('#app-btn-search').click(function () { |
| | | var province = $('#province').val(); |
| | | var city = $("#city").val(); |
| | | var area = $('#areas').val(); |
| | | var sourceHospitalName = $('#hospitalName-seach').val(); |
| | | table.reload('app-table', { |
| | | where: { |
| | | province: province, |
| | | city: city, |
| | | area: area, |
| | | sourceHospitalName:sourceHospitalName |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | // 添加按钮点击事件 |
| | | $('#screeningOrganization-btn-add').click(function () { |
| | | showEditModel_add("添加"); |
| | | }); |
| | | |
| | | var showEditModel_add = function (title, data) { |
| | | admin.putTempData('t_screeningOrganization', data); |
| | | admin.popupCenter({ |
| | | title: title, |
| | | path: 'pages/keaigao/screeningOrganization_form.html', |
| | | area: '600px', |
| | | offset: '0px', |
| | | finish: function () { |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | // 工具条点击事件 |
| | | table.on('tool(app-table)', function (obj) { |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | if (layEvent === 'downLoad') { |
| | | var url = config.base_server + "api-opration/screeningorganizationinfo/downLoad"; |
| | | // 下载二维码 |
| | | // 获取XMLHttpRequest |
| | | var xmlResquest = new XMLHttpRequest(); |
| | | // 发起请求 |
| | | xmlResquest.open("POST", url, true); |
| | | // 设置请求头类型 |
| | | xmlResquest.setRequestHeader("Content-type", "application/json"); |
| | | xmlResquest.setRequestHeader("Authorization","Bearer " + config.getToken().access_token); |
| | | xmlResquest.responseType = "blob"; |
| | | var data = JSON.stringify({"url": data.qrCode,"no":data.organizationNo}); |
| | | |
| | | // 返回 |
| | | xmlResquest.onload = function() { |
| | | if (this.status == 200) { |
| | | var fileName = "002.png"; |
| | | var blob = this.response; |
| | | var a = document.createElement('a'); |
| | | a.innerHTML = fileName; |
| | | // 指定生成的文件名 |
| | | a.download = fileName; |
| | | a.href = URL.createObjectURL(blob); |
| | | document.body.appendChild(a); |
| | | var evt = document.createEvent("MouseEvents"); |
| | | evt.initEvent("click", false, false); |
| | | a.dispatchEvent(evt); |
| | | document.body.removeChild(a); |
| | | } |
| | | }; |
| | | xmlResquest.send(data); |
| | | |
| | | } else if (layEvent === 'edit') { |
| | | showEditModel_add("编辑", data); |
| | | } |
| | | }); |
| | | |
| | | function downLoad(url) { |
| | | window.open(url); |
| | | } |
| | | |
| | | // 导入按钮点击事件 |
| | | $('#screeningOrganization-btn-import').click(function () { |
| | | showEditModel_import("导入"); |
| | | }); |
| | | |
| | | var showEditModel_import = function (title, data) { |
| | | admin.popupCenter({ |
| | | title: title, |
| | | path: 'pages/keaigao/importScreeningOrganization.html', |
| | | area: '600px', |
| | | offset: '0px', |
| | | finish: function () { |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | }); |
| | | </script> |
New file |
| | |
| | | <form id="app-form-add" lay-filter="app-form-add" class="layui-form model-form"> |
| | | <input name="id" type="hidden"/> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;">所在医院</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="sourceHospitalName" id="sourceHospitalName" placeholder="请输入医院名称" type="text" class="layui-input" |
| | | maxlength="50" lay-verify="required" required style="width: 150px;"/> |
| | | <input type="hidden" name="sourceHospitalId" id="sourceHospitalId"/> |
| | | <input type="hidden" name="id" id="id"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 67px;">机构编码</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="organizationNo" id="organizationNo" placeholder="请输入机构编码" type="text" class="layui-input" |
| | | maxlength="10" lay-verify="required" required style="width: 150px;"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" style="width: 75px;">所在区域</label> |
| | | <div class="layui-inline" style="width: 134px;"> |
| | | <select lay-verify="required" required id="OrganizationProvince" placeholder="省份" |
| | | lay-filter="OrganizationProvince" > |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline" style="width: 134px;"> |
| | | <select id="OrganizationCity" lay-verify="required" required placeholder="市" lay-filter="OrganizationCity"> |
| | | <option value="">选择市</option> |
| | | </select> |
| | | </div> |
| | | <div class="layui-inline" style="width: 134px;"> |
| | | <select id="OrganizationArea" lay-verify="required" required placeholder="区县" lay-filter="OrganizationArea"> |
| | | <option value="">选择区县</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;">机构名称</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="organizationName" id="organizationName" placeholder="请输入机构名称" type="text" class="layui-input" |
| | | maxlength="20" lay-verify="required" required style="width: 150px;"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 67px;">机构简称</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="abbreviation" id="abbreviation" placeholder="请输入机构简称" type="text" class="layui-input" |
| | | maxlength="10" lay-verify="required" required style="width: 150px;"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;">联系人</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="contactName" id="contactName" placeholder="请输入联系人" type="text" class="layui-input" |
| | | maxlength="50" lay-verify="required" required style="width: 150px;"/> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 67px;">联系电话</label> |
| | | <div class="layui-input-block" style="width: 150px;"> |
| | | <input name="contactNumber" id="contactNumber" placeholder="请输入联系电话" type="text" class="layui-input" |
| | | maxlength="15" lay-verify="number" required style="width: 150px;"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div style="display:flex"> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 75px;">说明</label> |
| | | <div class="layui-input-block" style="width: 430px;"> |
| | | <textarea name="remark" id="remark" lay-verify="required" required placeholder="请输入说明" class="layui-textarea" |
| | | style="width:99%;height:100px" maxlength="100"></textarea> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-form-item model-form-footer"> |
| | | <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button> |
| | | <button class="layui-btn" id="sure" lay-filter="screeningHospital-form-submit" |
| | | lay-submit>保存 |
| | | </button> |
| | | </div> |
| | | </form> |
| | | |
| | | <script> |
| | | layui.use(['form', 'laydate', 'util', 'config', 'admin', 'autocomplete', 'formSelects','area'], function () { |
| | | var form = layui.form; |
| | | var config = layui.config; |
| | | var layer = layui.layer; |
| | | var admin = layui.admin; |
| | | var autocomplete = layui.autocomplete; |
| | | var $ = layui.jquery; |
| | | var area = layui.area; |
| | | |
| | | form.render(); |
| | | |
| | | //省份数据加载 |
| | | area.areaData("#OrganizationProvince", 1, "", ""); |
| | | |
| | | //装载市区数据 |
| | | form.on("select(OrganizationProvince)", function (data) { |
| | | area.areasClear("#OrganizationArea", 3); |
| | | area.areaData("#OrganizationCity", 2, data.value, ""); |
| | | }); |
| | | //装载区县数据 |
| | | form.on("select(OrganizationCity)", function (data) { |
| | | area.areaData("#OrganizationArea", 3, data.value, ""); |
| | | }); |
| | | |
| | | // 表单提交事件 |
| | | form.on('submit(screeningHospital-form-submit)', function (data) { |
| | | data.field.sourceHospitalId = $("#sourceHospitalId").val(); |
| | | data.field.sourceHospitalName = $("#sourceHospitalName").val(); |
| | | data.field.province = $("#OrganizationProvince").val(); |
| | | data.field.city = $("#OrganizationCity").val(); |
| | | data.field.area = $("#OrganizationArea").val(); |
| | | |
| | | data.field.organizationName = $("#organizationName").val(); |
| | | data.field.abbreviation = $("#abbreviation").val(); |
| | | data.field.contactName = $("#contactName").val(); |
| | | data.field.contactNumber = $("#contactNumber").val(); |
| | | data.field.remarks = $("#remark").val(); |
| | | data.field.areaCode=$("#OrganizationProvince option:selected").text() + $("#OrganizationCity option:selected").text()+ |
| | | $("#OrganizationArea option:selected").text(); |
| | | |
| | | layer.load(2); |
| | | admin.req('api-opration/screeningorganizationinfo', JSON.stringify(data.field), function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |
| | | layer.closeAll(); |
| | | parent.layui.table.reload('app-table', {}); |
| | | } else { |
| | | layer.msg(data.msg, { |
| | | icon: 2, |
| | | time: 3000 |
| | | }); |
| | | } |
| | | }, "POST"); |
| | | return false; |
| | | }); |
| | | |
| | | //自动完成-医院名称 |
| | | autocomplete.render({ |
| | | elem: $('#sourceHospitalName')[0], |
| | | keywordsName: 'hospitalName', //查询关键字名称 |
| | | url: config.base_server + 'api-opration/hospitalscreening/findByName', |
| | | template_val: '{{d.hospitalName}}', //选择后文本框显示的数据字段 |
| | | template_txt: "<div class='layui-table-cell'>{{d.hospitalName}}</div>", //下拉列表模板 |
| | | onselect: function (resp) { |
| | | $("#sourceHospitalId").val(resp.id); |
| | | } |
| | | }); |
| | | |
| | | var screeningOrganization = admin.getTempData('t_screeningOrganization'); |
| | | if(screeningOrganization){ |
| | | $("#sourceHospitalName").val(screeningOrganization.sourceHospitalName); |
| | | $("#sourceHospitalId").val(screeningOrganization.sourceHospitalId); |
| | | $("#id").val(screeningOrganization.id); |
| | | $("#organizationNo").val(screeningOrganization.organizationNo); |
| | | $("#OrganizationProvince").val(screeningOrganization.province); |
| | | area.areaData("#OrganizationCity", 2, $("#OrganizationProvince").val(), screeningOrganization.city); |
| | | $("#OrganizationCity").val(screeningOrganization.city); |
| | | area.areaData("#OrganizationArea", 3, $("#OrganizationCity").val(), screeningOrganization.area); |
| | | $("#OrganizationArea").val(screeningOrganization.area); |
| | | |
| | | $("#organizationName").val(screeningOrganization.organizationName); |
| | | $("#abbreviation").val(screeningOrganization.abbreviation); |
| | | $("#contactName").val(screeningOrganization.contactName); |
| | | $("#contactNumber").val(screeningOrganization.contactNumber); |
| | | $("#remark").val(screeningOrganization.remarks); |
| | | |
| | | form.render(); |
| | | } |
| | | }); |
| | | </script> |
| | |
| | | } |
| | | } |
| | | |
| | | table.reload('app-table', { where: { recordTitle: key, startTime: startTime, endTime: endTime} }); |
| | | table.reload('app-table', { where: { recordTitle: key, startTime: startTime, endTime: endTime},page: {curr: 1 } }); |
| | | }); |
| | | //比较日期大小 |
| | | function compareDate(logintime, logouttime) { |
| | |
| | | { |
| | | $("#hospitalId").val(""); |
| | | } |
| | | table.reload('contract-table', { where: { hospitalId: $("#hospitalId").val()} }); |
| | | table.reload('contract-table', { |
| | | where: { hospitalId: $("#hospitalId").val()}, |
| | | page: { |
| | | curr: 1 |
| | | } }); |
| | | }); |
| | | |
| | | var showModel=function(orderId){ |
| | |
| | | } |
| | | } |
| | | |
| | | table.reload('app-table', { where: { doctorName: key, needBegintime: needBegintime, needEndtime: needEndtime } }); |
| | | table.reload('app-table', { where: { doctorName: key, needBegintime: needBegintime, needEndtime: needEndtime },page: {curr: 1 } }); |
| | | }); |
| | | //比较日期大小 |
| | | function compareDate(logintime, logouttime) { |
| | |
| | | }); |
| | | // 搜索按钮点击事件 |
| | | $('#diagnostic-btn-search').click(function () { |
| | | debugger |
| | | var diagnosticHospitalId = $('#hospitalId').val(); |
| | | if (!strUtil.isEmpty(diagnosticHospitalId)) { |
| | | var childName = $('#childName').val(); |
| | |
| | | startTime: datebegin, |
| | | endTime: dateend |
| | | }; |
| | | table.reload('diagnostic-table', { where: whereData }); |
| | | table.reload('diagnostic-table', { where: whereData,page: {curr: 1 }}); |
| | | } |
| | | }); |
| | | // 工具条点击事件 |
| | |
| | | hospitalName: hospitalName, |
| | | doctorTel: doctorTel, |
| | | doctorName: doctorName |
| | | } |
| | | }, |
| | | page: { |
| | | curr: 1 |
| | | } |
| | | }); |
| | | }); |
| | | |
| | |
| | | var templeteType = $('#templeteType').val(); |
| | | var publicType = $('#publicType').val(); |
| | | var templeteTitle = $('#templeteTitle').val(); |
| | | table.reload('app-table', { where: { templeteType: templeteType, publicType: publicType, templeteTitle: templeteTitle } }); |
| | | table.reload('app-table', { where: { templeteType: templeteType, publicType: publicType, templeteTitle: templeteTitle },page: {curr: 1 } }); |
| | | }); |
| | | |
| | | // 修改user状态 |
| | |
| | | var departId = $('#departmentId-serch').val(); |
| | | var hospitalId = $('#hospitalId-serch').val(); |
| | | var templeteTitle = $('#templeteTitle').val(); |
| | | table.reload('app-table', { where: { hospitalId: hospitalId, departId: departId } }); |
| | | table.reload('app-table', { where: { hospitalId: hospitalId, departId: departId },page: {curr: 1} }); |
| | | }); |
| | | |
| | | // 修改user状态 |
| | |
| | | dateend = dateUtil.getNowDate(); |
| | | $('#dateend').val(dateend); |
| | | } |
| | | table.reload('feedback-table', { where: { doctorName: doctorName, createTime: datebegin, updateTime: dateend } }); |
| | | table.reload('feedback-table', { where: { doctorName: doctorName, createTime: datebegin, updateTime: dateend },page: {curr: 1 } }); |
| | | }); |
| | | }); |
| | | </script> |
| | |
| | | updateTime = dateUtil.getNowDate(); |
| | | $('#dateend').val(updateTime); |
| | | } |
| | | table.reload('product-table', { where: { createTime: createTime,updateTime: updateTime } }); |
| | | table.reload('product-table', { |
| | | where: { createTime: createTime,updateTime: updateTime}, |
| | | page: { |
| | | curr: 1 |
| | | } }); |
| | | }); |
| | | }); |
| | | </script> |
| | |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="productdetail-List">套餐</a> |
| | | <a class="layui-btn layui-btn-xs permissions" permissions="product-rechage" lay-event="pay">充值</a> |
| | | <a class="layui-btn layui-btn-xs layui-btn-normal" permissions="product-pay" lay-event="userpay">支付</a> |
| | | <a class="layui-btn layui-btn-xs layui-btn-normal" permissions="product-pay" lay-event="health">运功处方</a> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs permissions" permissions="hospital-save" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs permissions" permissions="hospital-del" lay-event="del">删除</a> |
| | | </script> |
| | |
| | | }, |
| | | page: true, |
| | | cols: [ |
| | | [{ |
| | | field: 'hospitalId', |
| | | width: 180, |
| | | title: '医院编号', |
| | | fixed: 'left' |
| | | }, |
| | | [ |
| | | |
| | | { |
| | | field: 'hospitalName', |
| | | width: 250, |
| | | width: "10%", |
| | | title: '医院名称', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | field: 'departmentName', |
| | | width: 100, |
| | | width: "6%", |
| | | title: '科室/部门', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | field: 'hospitalId',width: '12%',title: '医院编号', |
| | | }, |
| | | { |
| | | field: 'hospitalArea', |
| | | width: 200, |
| | | width: "10%", |
| | | title: '所在地区', |
| | | templet: function (d) { |
| | | return ((d.hospitalProvince == null) ? "" : d.hospitalProvince) + |
| | |
| | | }, |
| | | { |
| | | field: 'hospitalLink', |
| | | width: 100, |
| | | width: "6%", |
| | | title: '联系人' |
| | | }, |
| | | { |
| | | field: 'hospitalTel', |
| | | width: 150, |
| | | width: "8%", |
| | | title: '联系方式' |
| | | }, |
| | | // { |
| | |
| | | // }, |
| | | { |
| | | field: 'isScreen', |
| | | width: 80, |
| | | width: "4%", |
| | | title: '筛查', |
| | | templet: function (d) { |
| | | return d.isScreen ? "是" : "否" |
| | |
| | | // { field: 'isAnswer', width: 80, title: '医答',templet:function (d) { |
| | | // return d.isScreen?"是":"否" |
| | | // } }, |
| | | |
| | | { |
| | | field: 'serverUserName', |
| | | width: 100, |
| | | width: "6%", |
| | | title: '服务人员' |
| | | }, |
| | | { |
| | | field: 'createTime', |
| | | width: 150, |
| | | width: "10%", |
| | | title: '创建时间', |
| | | templet: function (d) { |
| | | return new Date(d.createTime).dateFormat("yyyy-MM-dd hh:mm"); |
| | |
| | | }, |
| | | { |
| | | field: 'enabled', |
| | | width: 80, |
| | | width: "7%", |
| | | templet: '#hospital-tpl-state', |
| | | title: '状态', |
| | | align: 'center', |
| | | fixed: 'right' |
| | | }, |
| | | { |
| | | field: 'hospitalId', |
| | | width: 240, |
| | | // field: 'hospitalId', |
| | | width: "20%", |
| | | align: 'center', |
| | | toolbar: '#businessRecords-table-bar', |
| | | title: '操作', |
| | |
| | | $('#hospita-btn-search').click(); |
| | | } |
| | | }); |
| | | } else if(layEvent=="health"){ |
| | | //充值 |
| | | admin.putTempData("t_hospital", data); |
| | | admin.popupCenter({ |
| | | title: '运动处方服务', |
| | | path: 'pages/opration/hospital_health.html', |
| | | area: '500px', |
| | | offset: '50px', |
| | | finish: function () { |
| | | $('#hospita-btn-search').click(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | // 搜索按钮点击事件 |
| | |
| | | hospitalName: hospitalName, |
| | | hospitalProvince: hospitalProvince, |
| | | hospitalCity: hospitalCity, |
| | | hospitalArea: hospitalArea |
| | | hospitalArea: hospitalArea, |
| | | // page: 1, |
| | | }; |
| | | table.reload('hospital-table', { |
| | | where: whereModel |
| | | where: whereModel, |
| | | page: { |
| | | curr: 1 |
| | | } |
| | | }); |
| | | }); |
| | | |
New file |
| | |
| | | <form id="health-form" lay-filter="health-form" class="layui-form model-form" method="POST"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" style="width: 150px;">服务</label> |
| | | <div class="layui-input-block"> |
| | | <input type="checkbox" name="isHealth" lay-skin="switch" lay-filter="health_enabled" lay-text="启用|停用" /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" style="width: 150px;">生效时间</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" lay-verify="required" required name="healthBeginTime" class="layui-input" id="healthBeginTime"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label" style="width: 150px;">结束时间</label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" lay-verify="required" required name="healthEndTime" class="layui-input" id="healthEndTime"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item model-form-footer"> |
| | | <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button> |
| | | <button class="layui-btn permissions" permissions="productpay-edit" lay-filter="health-form-submit" |
| | | lay-submit>保存</button> |
| | | </div> |
| | | <input type="hidden" value="" id="id" name="id" /> |
| | | </form> |
| | | <script> |
| | | layui.use(['form', 'table', 'laydate', 'config', 'admin', 'formSelects'], function () { |
| | | var form = layui.form; |
| | | var table = layui.table; |
| | | var config = layui.config; |
| | | var layer = layui.layer; |
| | | var admin = layui.admin; |
| | | var laydate = layui.laydate; |
| | | var oldData = {}; |
| | | |
| | | |
| | | laydate.render({ |
| | | elem: '#healthBeginTime', //指定元素 |
| | | type: 'date', |
| | | min: layui.util.toDateString(new Date(), 'yyyy-MM-dd'), |
| | | done: function (value, date, endDate) { |
| | | var startDate = new Date(value).getTime(); |
| | | var endTime = new Date($('#healthEndTime').val()).getTime(); |
| | | if (endTime < startDate) { |
| | | layer.msg('结束时间不能小于开始时间'); |
| | | $('#healthBeginTime').val($('#healthEndTime').val()); |
| | | } |
| | | } |
| | | }); |
| | | laydate.render({ |
| | | elem: '#healthEndTime', //指定元素 |
| | | type: 'date', |
| | | min: layui.util.toDateString(new Date(), 'yyyy-MM-dd'), |
| | | done: function (value, date, endDate) { |
| | | var startDate = new Date($('#healthBeginTime').val()).getTime(); |
| | | var endTime = new Date(value).getTime(); |
| | | if (endTime < startDate) { |
| | | layer.msg('结束时间不能小于开始时间'); |
| | | $('#healthEndTime').val($('#healthBeginTime').val()); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | //回显医院基本数据 |
| | | let hospitalData = admin.getTempData('t_hospital'); |
| | | // form.val('health-form', hospitalData); |
| | | $("#id").val(hospitalData.departmentId) |
| | | admin.req('api-user/sysdepartment/' + hospitalData.departmentId, {}, function (data) { |
| | | if (data.code === 0) { |
| | | if (data.data != null) { |
| | | if (data.data.isHealth) { |
| | | data.data.healthBeginTime = layui.util.toDateString(data.data.healthBeginTime, 'yyyy-MM-dd') |
| | | data.data.healthEndTime = layui.util.toDateString(data.data.healthEndTime, 'yyyy-MM-dd') |
| | | oldData={} |
| | | form.val('health-form', data.data); |
| | | } else { |
| | | oldData.healthEndTime = layui.util.toDateString(data.data.healthEndTime, 'yyyy-MM-dd') |
| | | oldData.healthBeginTime = layui.util.toDateString(data.data.healthBeginTime, 'yyyy-MM-dd') |
| | | } |
| | | } |
| | | } else { |
| | | layer.closeAll('loading'); |
| | | layer.msg(data.msg, { |
| | | icon: 2, |
| | | time: 2000 |
| | | }); |
| | | } |
| | | }, 'get'); |
| | | form.render(); |
| | | |
| | | // 表单提交事件 |
| | | form.on('submit(health-form-submit)', function (data) { |
| | | layer.load(2); |
| | | if (data.field.isHealth === 'on') { |
| | | data.field.isHealth = true; |
| | | } else { |
| | | data.field.isHealth = false; |
| | | } |
| | | admin.req('api-user/sysdepartment/', JSON.stringify(data.field), function (data) { |
| | | if (data.code === 0) { |
| | | layer.closeAll('loading'); |
| | | layer.msg(data.msg, { |
| | | icon: 1, |
| | | time: 2000 |
| | | }); |
| | | admin.finishPopupCenter(); |
| | | } else { |
| | | layer.closeAll('loading'); |
| | | layer.msg(data.msg, { |
| | | icon: 2, |
| | | time: 2000 |
| | | }); |
| | | } |
| | | }, "post"); |
| | | return false; |
| | | }); |
| | | // 修改服务状态 |
| | | form.on('switch(health_enabled)', function (obj) { |
| | | if (obj.elem.checked) { |
| | | form.val('health-form', oldData); |
| | | } |
| | | form.render(); |
| | | }); |
| | | }) |
| | | </script> |
| | |
| | | // 搜索按钮点击事件 |
| | | $('#product-btn-search').click(function () { |
| | | var proName = $('#product-search-value').val(); |
| | | table.reload('product-table', { where: { proName: proName } }); |
| | | table.reload('product-table', { where: { proName: proName}, |
| | | page: { |
| | | curr: 1 |
| | | } }); |
| | | }); |
| | | // 添加按钮点击事件 |
| | | $('#product-btn-add').click(function () { |
| | |
| | | $('#product-btn-search').click(function () { |
| | | var monthPar = $('#monthPar').val(); |
| | | var aiCountPar = $('#aiCountPar').val(); |
| | | table.reload('product-end-table', { where: { monthPar: monthPar, aiCountPar: aiCountPar } }); |
| | | table.reload('product-end-table', { where: { monthPar: monthPar, aiCountPar: aiCountPar },page: {curr: 1 } }); |
| | | }); |
| | | renderTable(); |
| | | }); |
| | |
| | | } |
| | | var proName = $('#product-search-value').val(); |
| | | var hospitalId = $('#hospitalId').val(); |
| | | table.reload('product-table', { where: { proName: proName,hospitalId: hospitalId,startTime: startTime, endTime: endTime } }); |
| | | table.reload('product-table', { |
| | | where: { proName: proName,hospitalId: hospitalId,startTime: startTime, endTime: endTime }, |
| | | page: { |
| | | curr: 1 |
| | | } }); |
| | | }); |
| | | |
| | | //比较日期大小 |
| | |
| | | // 搜索按钮点击事件 |
| | | $('#app-btn-search').click(function () { |
| | | var key = $('#app-edit-search').val(); |
| | | table.reload('app-table', { where: { dictionariesName: key } }); |
| | | table.reload('app-table', { |
| | | where: { dictionariesName: key }, |
| | | page: { |
| | | curr: 1 |
| | | } }); |
| | | }); |
| | | // 修改role状态 |
| | | form.on('switch(dictionaries-tpl-state)', function (obj) { |
| | |
| | | $('#product-btn-search').click(function () { |
| | | var proName = $('#product-search-value').val(); |
| | | var hospitalName = $('#hospital-search-value').val(); |
| | | table.reload('product-table', { where: { proName: proName, hospitalName: hospitalName } }); |
| | | table.reload('product-table', { |
| | | where: { proName: proName, hospitalName: hospitalName }, |
| | | page: { |
| | | curr: 1 |
| | | } }); |
| | | }); |
| | | }); |
| | | </script> |