Commit 24d0e2cfee46379b20a02731d790a5c6a48286cb
Exists in
master
Merge branch 'master' of
https://git.healthbaby.com.cn/jiangjiazhi/center.git Conflicts: parent/mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/generator/MysqlGenerator.java
Showing 59 changed files
- parent/base.common/src/main/java/com/lyms/base/common/dao/organ/OrganGroupMapsMapper.java
- parent/base.common/src/main/java/com/lyms/base/common/dao/organ/OrganGroupMapsMapper.xml
- parent/base.common/src/main/java/com/lyms/base/common/dao/role/RolesMapper.xml
- parent/base.common/src/main/java/com/lyms/base/common/entity/organ/OrganGroup.java
- parent/base.common/src/main/java/com/lyms/base/common/entity/organ/OrganGroupMaps.java
- parent/base.common/src/main/java/com/lyms/base/common/entity/role/Roles.java
- parent/base.common/src/main/java/com/lyms/base/common/package-info.java
- parent/base.common/src/main/java/com/lyms/base/common/service/organ/OrganGroupMapsService.java
- parent/base.common/src/main/java/com/lyms/base/common/service/organ/OrganGroupService.java
- parent/base.common/src/main/java/com/lyms/base/common/service/organ/impl/OrganGroupMapsServiceImpl.java
- parent/base.common/src/main/java/com/lyms/base/common/service/organ/impl/OrganGroupServiceImpl.java
- parent/base.common/src/main/java/com/lyms/base/common/service/role/impl/RolesServiceImpl.java
- parent/base.common/src/main/java/com/lyms/base/common/service/user/impl/UsersServiceImpl.java
- parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysDepartmentsController.java
- parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysOrganGroupController.java
- parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysOrganizationsController.java
- parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysRolesController.java
- parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysUsersController.java
- parent/center.manager/src/main/resources/xml/app-timer.xml
- parent/center.manager/src/main/webapp/WEB-INF/views/depart/depart_edit.html
- parent/center.manager/src/main/webapp/WEB-INF/views/depart/depart_list.html
- parent/center.manager/src/main/webapp/WEB-INF/views/group/group_edit.html
- parent/center.manager/src/main/webapp/WEB-INF/views/group/group_list.html
- parent/center.manager/src/main/webapp/WEB-INF/views/organ/org_edit.html
- parent/center.manager/src/main/webapp/WEB-INF/views/organ/org_list.html
- parent/center.manager/src/main/webapp/WEB-INF/views/role/role_edit.html
- parent/center.manager/src/main/webapp/WEB-INF/views/role/role_list.html
- parent/center.manager/src/main/webapp/WEB-INF/views/role/tree_test.html
- parent/center.manager/src/main/webapp/WEB-INF/views/user/user_edit.html
- parent/center.manager/src/main/webapp/WEB-INF/views/user/user_list.html
- parent/center.manager/src/test/java/center/manager/test/user/WorkTest.java
- parent/core.sdk/src/main/java/com/lyms/sync/SyncCenter.java
- parent/core.sdk/src/main/java/com/lyms/sync/SyncHandler.java
- parent/core.sdk/src/main/java/com/lyms/sync/queue/SyncQueue.java
- parent/core.sdk/src/main/java/com/lyms/util/DateUtil.java
- parent/core.sdk/src/main/java/com/lyms/web/controller/BaseController.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/dao/diagnose/DiagnoseInfoMapper.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/dao/diagnose/DiagnoseInfoMapper.xml
- parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/DiagnoseAssitMapper.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/DiagnoseAssitMapper.xml
- parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/PatientCheckTicketMapper.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/WomanCheckTicketMapper.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/WomanCheckTicketMapper.xml
- parent/hospital.mac/src/main/java/com/lyms/hospital/entity/diagnose/DiagnoseAssit.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/entity/diagnose/DiagnoseInfo.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/entity/woman/WomanCheckTicket.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/entity/woman/WomanFetationRecord.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/enums/DiagnoseTypeEnums.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/service/diagnose/DiagnoseAssitService.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/service/diagnose/DiagnoseInfoService.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/service/diagnose/impl/DiagnoseAssitServiceImpl.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/service/diagnose/impl/DiagnoseInfoServiceImpl.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistorySourceServiceImpl.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/WomanCheckTicketService.java
- parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/impl/WomanCheckTicketServiceImpl.java
- parent/hospital.web/src/main/java/com/lyms/hospital/util/CompressEncodeingUtil.java
- parent/hospital.web/src/test/java/test/hospital/highrisk/HighriskMapsTest.java
- parent/mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/generator/MysqlGenerator.java
- parent/pom.xml
parent/base.common/src/main/java/com/lyms/base/common/dao/organ/OrganGroupMapsMapper.java
View file @
24d0e2c
| 1 | +package com.lyms.base.common.dao.organ; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | +import java.util.List; | |
| 5 | + | |
| 6 | +import org.springframework.stereotype.Repository; | |
| 7 | + | |
| 8 | +import com.baomidou.mybatisplus.mapper.BaseMapper; | |
| 9 | +import com.baomidou.mybatisplus.plugins.Page; | |
| 10 | +import com.lyms.base.common.entity.organ.OrganGroup; | |
| 11 | +import com.lyms.base.common.entity.organ.OrganGroupMaps; | |
| 12 | + | |
| 13 | +/** | |
| 14 | + * <p> | |
| 15 | + * Mapper接口 | |
| 16 | + * </p> | |
| 17 | + * | |
| 18 | + * @author fangcheng | |
| 19 | + * @since 2017-03-09 | |
| 20 | + */ | |
| 21 | +@Repository | |
| 22 | +public interface OrganGroupMapsMapper extends BaseMapper<OrganGroupMaps> { | |
| 23 | + | |
| 24 | + public Integer deleteLogicById(Serializable id); | |
| 25 | + | |
| 26 | + public List<OrganGroup> getOrgList(Page<OrganGroup> page,Serializable groupId); | |
| 27 | + | |
| 28 | +} |
parent/base.common/src/main/java/com/lyms/base/common/dao/organ/OrganGroupMapsMapper.xml
View file @
24d0e2c
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lyms.base.common.dao.organ.OrganGroupMapsMapper"> | |
| 4 | + | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.base.common.entity.organ.OrganGroupMaps"> | |
| 7 | + <id column="ID" property="id" /> | |
| 8 | + <result column="GROUP_ID" property="group_id" /> | |
| 9 | + <result column="ORGAN_ID" property="organ_id" /> | |
| 10 | + </resultMap> | |
| 11 | + | |
| 12 | + <!-- 通用查询结果列 --> | |
| 13 | + <sql id="Base_Column_List"> | |
| 14 | + ID AS id, GROUP_ID AS group_id, ORGAN_ID AS organ_id | |
| 15 | + </sql> | |
| 16 | + | |
| 17 | + <select id="getOrgList" resultType="Organizations"> | |
| 18 | + select o.* from SYS_ORGANIZATIONS o left join SYS_ORGAN_GROUP_MAPS g on o.ID = g.ORGAN_ID where g.GROUP_ID = #{groupId} | |
| 19 | + </select> | |
| 20 | +</mapper> |
parent/base.common/src/main/java/com/lyms/base/common/dao/role/RolesMapper.xml
View file @
24d0e2c
| ... | ... | @@ -10,6 +10,7 @@ |
| 10 | 10 | <result column="REMARKS" property="remarks" /> |
| 11 | 11 | <result column="SHORT_CODE" property="shortCode" /> |
| 12 | 12 | <result column="ORG_ID" property="orgId" /> |
| 13 | + <result column="GROUPORG_ID" property="grouporgId" /> | |
| 13 | 14 | <result column="CREATE_ID" property="createId" /> |
| 14 | 15 | <result column="CREATE_TIME" property="createTime" /> |
| 15 | 16 | <result column="MODIFY_ID" property="modifyId" /> |
| ... | ... | @@ -20,7 +21,7 @@ |
| 20 | 21 | |
| 21 | 22 | <!-- 通用查询结果列 --> |
| 22 | 23 | <sql id="Base_Column_List"> |
| 23 | - ID AS id, TYPE AS type, NAME AS name, REMARKS AS remarks, SHORT_CODE AS shortCode, ORG_ID AS orgId, CREATE_ID AS createId, CREATE_TIME AS createTime, MODIFY_ID AS modifyId, MODIFY_TIME AS modifyTime, IFDEL AS ifdel, ENABLE AS enable | |
| 24 | + ID AS id, TYPE AS type, NAME AS name, REMARKS AS remarks, SHORT_CODE AS shortCode, ORG_ID AS orgId, GROUPORG_ID AS grouporgId, CREATE_ID AS createId, CREATE_TIME AS createTime, MODIFY_ID AS modifyId, MODIFY_TIME AS modifyTime, IFDEL AS ifdel, ENABLE AS enable | |
| 24 | 25 | </sql> |
| 25 | 26 | </mapper> |
parent/base.common/src/main/java/com/lyms/base/common/entity/organ/OrganGroup.java
View file @
24d0e2c
| ... | ... | @@ -44,6 +44,9 @@ |
| 44 | 44 | */ |
| 45 | 45 | @TableField(value = "CLIENTADDRESS") |
| 46 | 46 | private String clientaddress; |
| 47 | + | |
| 48 | + @TableField(exist=false) | |
| 49 | + private String orgIds; | |
| 47 | 50 | |
| 48 | 51 | /** |
| 49 | 52 | * 0:可用 1:不可用 |
| ... | ... | @@ -98,6 +101,15 @@ |
| 98 | 101 | public void setIfdel(Integer ifdel) { |
| 99 | 102 | this.ifdel = ifdel; |
| 100 | 103 | } |
| 104 | + | |
| 105 | + public String getOrgIds() { | |
| 106 | + return orgIds; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setOrgIds(String orgIds) { | |
| 110 | + this.orgIds = orgIds; | |
| 111 | + } | |
| 112 | + | |
| 101 | 113 | |
| 102 | 114 | } |
parent/base.common/src/main/java/com/lyms/base/common/entity/organ/OrganGroupMaps.java
View file @
24d0e2c
| 1 | +package com.lyms.base.common.entity.organ; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.baomidou.mybatisplus.annotations.TableField; | |
| 6 | +import com.baomidou.mybatisplus.annotations.TableId; | |
| 7 | +import com.baomidou.mybatisplus.annotations.TableName; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * <p> | |
| 11 | + * | |
| 12 | + * </p> | |
| 13 | + * | |
| 14 | + * @author fangcheng | |
| 15 | + * @since 2017-04-02 | |
| 16 | + */ | |
| 17 | +@TableName("SYS_ORGAN_GROUP_MAPS") | |
| 18 | +public class OrganGroupMaps implements Serializable { | |
| 19 | + | |
| 20 | + private static final long serialVersionUID = 1L; | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * | |
| 24 | + */ | |
| 25 | + @TableId(value = "ID") | |
| 26 | + private String id; | |
| 27 | + /** | |
| 28 | + * | |
| 29 | + */ | |
| 30 | + @TableField(value = "GROUP_ID") | |
| 31 | + private String groupId; | |
| 32 | + /** | |
| 33 | + * 建档方式 | |
| 34 | + */ | |
| 35 | + @TableField(value = "ORGAN_ID") | |
| 36 | + private String organId; | |
| 37 | + public String getId() { | |
| 38 | + return id; | |
| 39 | + } | |
| 40 | + public void setId(String id) { | |
| 41 | + this.id = id; | |
| 42 | + } | |
| 43 | + public String getGroupId() { | |
| 44 | + return groupId; | |
| 45 | + } | |
| 46 | + public void setGroupId(String groupId) { | |
| 47 | + this.groupId = groupId; | |
| 48 | + } | |
| 49 | + public String getOrganId() { | |
| 50 | + return organId; | |
| 51 | + } | |
| 52 | + public void setOrganId(String organId) { | |
| 53 | + this.organId = organId; | |
| 54 | + } | |
| 55 | + | |
| 56 | + | |
| 57 | +} |
parent/base.common/src/main/java/com/lyms/base/common/entity/role/Roles.java
View file @
24d0e2c
| ... | ... | @@ -50,6 +50,11 @@ |
| 50 | 50 | @TableField(value="ORG_ID") |
| 51 | 51 | private String orgId; |
| 52 | 52 | /** |
| 53 | + * 机构组id | |
| 54 | + */ | |
| 55 | + @TableField(value="GROUPORG_ID") | |
| 56 | + private String grouporgId; | |
| 57 | + /** | |
| 53 | 58 | * |
| 54 | 59 | */ |
| 55 | 60 | @TableField(value="CREATE_ID") |
| ... | ... | @@ -176,6 +181,14 @@ |
| 176 | 181 | public void setEnable(Integer enable) { |
| 177 | 182 | this.enable = enable; |
| 178 | 183 | } |
| 184 | + | |
| 185 | + public String getGrouporgId() { | |
| 186 | + return grouporgId; | |
| 187 | + } | |
| 188 | + | |
| 189 | + public void setGrouporgId(String grouporgId) { | |
| 190 | + this.grouporgId = grouporgId; | |
| 191 | + } | |
| 179 | 192 | |
| 180 | 193 | } |
parent/base.common/src/main/java/com/lyms/base/common/package-info.java
View file @
24d0e2c
parent/base.common/src/main/java/com/lyms/base/common/service/organ/OrganGroupMapsService.java
View file @
24d0e2c
| 1 | +package com.lyms.base.common.service.organ; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.baomidou.mybatisplus.plugins.Page; | |
| 6 | +import com.lyms.base.common.entity.organ.OrganGroup; | |
| 7 | +import com.lyms.base.common.entity.organ.OrganGroupMaps; | |
| 8 | +import com.lyms.web.service.BaseService; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 服务类 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author fangcheng | |
| 16 | + * @since 2017-04-02 | |
| 17 | + */ | |
| 18 | +public interface OrganGroupMapsService extends BaseService<OrganGroupMaps> { | |
| 19 | + | |
| 20 | + /** | |
| 21 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 22 | + * <li>@param id 删除主键id | |
| 23 | + * <li>@return 大于0修改成功,否则为失败 | |
| 24 | + */ | |
| 25 | + public Integer deleteLogicById(Serializable id); | |
| 26 | + | |
| 27 | + /** | |
| 28 | + * <li>@Description:根据groupid获取所有机构 | |
| 29 | + * <li>@param groupId | |
| 30 | + * <li>@return | |
| 31 | + * <li>创建人:方承 | |
| 32 | + * <li>创建时间:2017年4月2日 | |
| 33 | + * <li>修改人: | |
| 34 | + * <li>修改时间: | |
| 35 | + */ | |
| 36 | + public Page<OrganGroup> getOrgList(Page<OrganGroup> page,Serializable groupId); | |
| 37 | + | |
| 38 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/organ/OrganGroupService.java
View file @
24d0e2c
parent/base.common/src/main/java/com/lyms/base/common/service/organ/impl/OrganGroupMapsServiceImpl.java
View file @
24d0e2c
| 1 | +package com.lyms.base.common.service.organ.impl; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.springframework.stereotype.Service; | |
| 6 | + | |
| 7 | +import com.baomidou.mybatisplus.plugins.Page; | |
| 8 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 9 | +import com.lyms.base.common.dao.organ.OrganGroupMapsMapper; | |
| 10 | +import com.lyms.base.common.entity.organ.OrganGroup; | |
| 11 | +import com.lyms.base.common.entity.organ.OrganGroupMaps; | |
| 12 | +import com.lyms.base.common.service.organ.OrganGroupMapsService; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * <p> | |
| 16 | + * 服务实现类 | |
| 17 | + * </p> | |
| 18 | + * | |
| 19 | + * @author fancgheng | |
| 20 | + * @since 2017-04-02 | |
| 21 | + */ | |
| 22 | +@Service | |
| 23 | +public class OrganGroupMapsServiceImpl extends ServiceImpl<OrganGroupMapsMapper, OrganGroupMaps> implements OrganGroupMapsService { | |
| 24 | + | |
| 25 | + public Integer deleteLogicById(Serializable id) { | |
| 26 | + return baseMapper.deleteLogicById(id); | |
| 27 | + } | |
| 28 | + | |
| 29 | + @Override | |
| 30 | + public Page<OrganGroup> getOrgList(Page<OrganGroup> page,Serializable groupId) { | |
| 31 | + page.setRecords(baseMapper.getOrgList(page,groupId)); | |
| 32 | + return page; | |
| 33 | + } | |
| 34 | + | |
| 35 | +} |
parent/base.common/src/main/java/com/lyms/base/common/service/organ/impl/OrganGroupServiceImpl.java
View file @
24d0e2c
| 1 | 1 | package com.lyms.base.common.service.organ.impl; |
| 2 | 2 | |
| 3 | 3 | import java.io.Serializable; |
| 4 | +import java.util.List; | |
| 4 | 5 | |
| 5 | 6 | import org.apache.commons.lang3.StringUtils; |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | 8 | import org.springframework.stereotype.Service; |
| 7 | 9 | import org.springframework.transaction.annotation.Transactional; |
| 8 | 10 | |
| 11 | +import com.baomidou.mybatisplus.mapper.EntityWrapper; | |
| 9 | 12 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| 10 | 13 | import com.lyms.base.common.dao.organ.OrganGroupMapper; |
| 14 | +import com.lyms.base.common.dao.organ.OrganGroupMapsMapper; | |
| 11 | 15 | import com.lyms.base.common.entity.organ.OrganGroup; |
| 16 | +import com.lyms.base.common.entity.organ.OrganGroupMaps; | |
| 17 | +import com.lyms.base.common.service.organ.OrganGroupMapsService; | |
| 12 | 18 | import com.lyms.base.common.service.organ.OrganGroupService; |
| 13 | 19 | import com.lyms.exception.SystemException; |
| 20 | +import com.lyms.util.InstanceUtils; | |
| 21 | +import com.lyms.util.StrUtils; | |
| 14 | 22 | |
| 15 | 23 | /** |
| 16 | 24 | * <p> |
| 17 | 25 | |
| 18 | 26 | |
| 19 | 27 | |
| 20 | 28 | |
| 21 | 29 | |
| ... | ... | @@ -22,18 +30,37 @@ |
| 22 | 30 | */ |
| 23 | 31 | @Service |
| 24 | 32 | public class OrganGroupServiceImpl extends ServiceImpl<OrganGroupMapper, OrganGroup> implements OrganGroupService { |
| 33 | + | |
| 34 | + @Autowired | |
| 35 | + private OrganGroupMapsMapper organGroupMapsMapper; | |
| 25 | 36 | |
| 37 | + @Transactional | |
| 26 | 38 | public Integer deleteLogicById(Serializable id) { |
| 39 | + organGroupMapsMapper.delete(new EntityWrapper<OrganGroupMaps>().where("GROUP_ID={0}", id)); | |
| 27 | 40 | return baseMapper.deleteLogicById(id); |
| 28 | 41 | } |
| 29 | 42 | |
| 30 | 43 | @Override |
| 31 | 44 | @Transactional |
| 32 | 45 | public boolean create(OrganGroup organGroup) throws SystemException { |
| 33 | - | |
| 34 | 46 | if (organGroup == null) |
| 35 | 47 | return false; |
| 48 | + organGroup.setId(StrUtils.uuid()); | |
| 49 | + if(StrUtils.isNotEmpty(organGroup.getOrgIds())){ | |
| 50 | + String[] ids = organGroup.getOrgIds().split(","); | |
| 51 | + List<OrganGroupMaps> mapsList = InstanceUtils.newArrayList(); | |
| 52 | + for(String id : ids){ | |
| 53 | + OrganGroupMaps maps = new OrganGroupMaps(); | |
| 54 | + maps.setId(StrUtils.uuid()); | |
| 55 | + maps.setGroupId(organGroup.getId()); | |
| 56 | + maps.setOrganId(id); | |
| 57 | + mapsList.add(maps); | |
| 58 | + organGroupMapsMapper.insert(maps); | |
| 59 | + } | |
| 60 | + organGroup.setOrgnumber(mapsList.size()); | |
| 61 | + } | |
| 36 | 62 | Integer tag = baseMapper.insert(organGroup); |
| 63 | + | |
| 37 | 64 | return tag != null && tag > 0; |
| 38 | 65 | |
| 39 | 66 | } |
| ... | ... | @@ -52,11 +79,25 @@ |
| 52 | 79 | @Override |
| 53 | 80 | @Transactional |
| 54 | 81 | public boolean updateGroup(OrganGroup organGroup) throws SystemException { |
| 55 | - | |
| 56 | - if (organGroup == null) | |
| 57 | - return false; | |
| 58 | - Integer tag = baseMapper.updateById(organGroup); | |
| 59 | - return tag != null && tag > 0; | |
| 82 | + if (organGroup == null) | |
| 83 | + return false; | |
| 84 | + organGroupMapsMapper.delete(new EntityWrapper<OrganGroupMaps>().where("GROUP_ID={0}", organGroup.getId())); | |
| 85 | + if(StrUtils.isNotEmpty(organGroup.getOrgIds())){ | |
| 86 | + String[] ids = organGroup.getOrgIds().split(","); | |
| 87 | + List<OrganGroupMaps> mapsList = InstanceUtils.newArrayList(); | |
| 88 | + for(String id : ids){ | |
| 89 | + OrganGroupMaps maps = new OrganGroupMaps(); | |
| 90 | + maps.setId(StrUtils.uuid()); | |
| 91 | + maps.setGroupId(organGroup.getId()); | |
| 92 | + maps.setOrganId(id); | |
| 93 | + mapsList.add(maps); | |
| 94 | + organGroupMapsMapper.insert(maps); | |
| 95 | + } | |
| 96 | + organGroup.setOrgnumber(mapsList.size()); | |
| 97 | + } | |
| 98 | + Integer tag = baseMapper.updateById(organGroup); | |
| 99 | + | |
| 100 | + return tag != null && tag > 0; | |
| 60 | 101 | |
| 61 | 102 | } |
| 62 | 103 | } |
parent/base.common/src/main/java/com/lyms/base/common/service/role/impl/RolesServiceImpl.java
View file @
24d0e2c
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | @Transactional |
| 46 | 46 | public boolean updateRole(Roles role, List<RolePermissionMaps> rpList) { |
| 47 | 47 | EntityWrapper<RolePermissionMaps> ew = new EntityWrapper<RolePermissionMaps>(); |
| 48 | - ew.where("role_id={0}", "'" + role.getId() + "'"); | |
| 48 | + ew.where("role_id={0}", role.getId()); | |
| 49 | 49 | baseMapper.updateById(role); |
| 50 | 50 | sysRolePermissionMapsService.delete(ew); |
| 51 | 51 | if (!rpList.isEmpty()) { |
parent/base.common/src/main/java/com/lyms/base/common/service/user/impl/UsersServiceImpl.java
View file @
24d0e2c
| ... | ... | @@ -103,7 +103,7 @@ |
| 103 | 103 | |
| 104 | 104 | Integer tag = userMapper.updateById(user); |
| 105 | 105 | EntityWrapper<UserRoleMaps> ew = new EntityWrapper<UserRoleMaps>(); |
| 106 | - ew.where("user_id={0}", "'" + user.getId() + "'"); | |
| 106 | + ew.where("user_id={0}", user.getId()); | |
| 107 | 107 | sysUserRoleMapsService.delete(ew); |
| 108 | 108 | if (!userRoleMapsList.isEmpty()) { |
| 109 | 109 | sysUserRoleMapsService.insertBatch(userRoleMapsList); |
| ... | ... | @@ -168,7 +168,7 @@ |
| 168 | 168 | * <li>修改时间: |
| 169 | 169 | */ |
| 170 | 170 | private boolean isExistAccount(String account) { |
| 171 | - Users entity = selectOne(new EntityWrapper<Users>().where("account={0}", "'" + account + "'").and("ifDel=0")); | |
| 171 | + Users entity = selectOne(new EntityWrapper<Users>().where("account={0}", account).and("ifDel=0")); | |
| 172 | 172 | if (null == entity) { |
| 173 | 173 | return false; |
| 174 | 174 | } |
parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysDepartmentsController.java
View file @
24d0e2c
| ... | ... | @@ -17,6 +17,7 @@ |
| 17 | 17 | import com.lyms.base.common.enums.ValidityEnum; |
| 18 | 18 | import com.lyms.base.common.service.organ.DepartmentsService; |
| 19 | 19 | import com.lyms.constants.OperationName; |
| 20 | +import com.lyms.util.StrUtils; | |
| 20 | 21 | import com.lyms.web.bean.AjaxResult; |
| 21 | 22 | import com.lyms.web.controller.BaseController; |
| 22 | 23 | |
| ... | ... | @@ -64,6 +65,14 @@ |
| 64 | 65 | Page<Departments> page = getPage(); |
| 65 | 66 | EntityWrapper<Departments> ew = new EntityWrapper<Departments>(); |
| 66 | 67 | ew.where("ifdel=" + ValidityEnum.VALIDITY.getValidity()); |
| 68 | + String searchName = getParameter("name"); | |
| 69 | + String searchOrgId = getParameter("orgId"); | |
| 70 | + if (StrUtils.isNotEmpty(searchName)) { | |
| 71 | + ew.and("name like {0}", searchName.trim() + "%"); | |
| 72 | + } | |
| 73 | + if (StrUtils.isNotEmpty(searchOrgId)) { | |
| 74 | + ew.and("org_id = {0}", searchOrgId.trim() ); | |
| 75 | + } | |
| 67 | 76 | page = departmentService.selectPage(page, ew); |
| 68 | 77 | return toGridData(page); |
| 69 | 78 | } |
parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysOrganGroupController.java
View file @
24d0e2c
| ... | ... | @@ -15,7 +15,11 @@ |
| 15 | 15 | import com.baomidou.mybatisplus.plugins.Page; |
| 16 | 16 | import com.lyms.base.common.entity.organ.OrganGroup; |
| 17 | 17 | import com.lyms.base.common.enums.ValidityEnum; |
| 18 | +import com.lyms.base.common.service.organ.OrganGroupMapsService; | |
| 18 | 19 | import com.lyms.base.common.service.organ.OrganGroupService; |
| 20 | +import com.lyms.constants.OperationName; | |
| 21 | +import com.lyms.util.StrUtils; | |
| 22 | +import com.lyms.web.bean.AjaxResult; | |
| 19 | 23 | import com.lyms.web.controller.BaseController; |
| 20 | 24 | |
| 21 | 25 | /** |
| ... | ... | @@ -32,6 +36,9 @@ |
| 32 | 36 | |
| 33 | 37 | @Autowired |
| 34 | 38 | private OrganGroupService groupService; |
| 39 | + | |
| 40 | + @Autowired | |
| 41 | + private OrganGroupMapsService organGroupMapsService; | |
| 35 | 42 | |
| 36 | 43 | /** |
| 37 | 44 | * <li>@Description:跳转到租列表 |
| 38 | 45 | |
| ... | ... | @@ -76,10 +83,41 @@ |
| 76 | 83 | if (!StringUtils.isBlank(id)) { |
| 77 | 84 | OrganGroup group = groupService.selectById(id); |
| 78 | 85 | model.addAttribute("group", group); |
| 79 | - | |
| 86 | + | |
| 80 | 87 | } |
| 81 | 88 | return "/group/group_edit"; |
| 82 | 89 | } |
| 90 | + @ResponseBody | |
| 91 | + @RequestMapping(value = "/create", method = { RequestMethod.POST }) | |
| 92 | + public AjaxResult create(OrganGroup organGroup, AjaxResult ajaxResult) { | |
| 93 | + boolean tag = groupService.create(organGroup); | |
| 94 | + return handleAjaxResult(ajaxResult, tag, OperationName.CREATE); | |
| 95 | + } | |
| 96 | + | |
| 97 | + @ResponseBody | |
| 98 | + @RequestMapping(value = "/update", method = { RequestMethod.POST }) | |
| 99 | + public AjaxResult update(OrganGroup organGroup, AjaxResult ajaxResult) { | |
| 100 | + boolean tag = groupService.updateGroup(organGroup); | |
| 101 | + return handleAjaxResult(ajaxResult, tag, OperationName.UPDATE); | |
| 102 | + } | |
| 103 | + | |
| 104 | + @RequestMapping(value = "/{id}/delete", method = { RequestMethod.GET, RequestMethod.POST }) | |
| 105 | + @ResponseBody | |
| 106 | + public AjaxResult delete(@PathVariable String id, AjaxResult ajaxResult) { | |
| 107 | + int tag = groupService.deleteLogicById(id); | |
| 108 | + return handleAjaxResult(ajaxResult, tag, OperationName.DELETE); | |
| 109 | + } | |
| 110 | + | |
| 111 | + | |
| 112 | + @ResponseBody | |
| 113 | + @RequestMapping(value = "/listGroupOrg/{groupId}", method = { RequestMethod.GET, RequestMethod.POST }) | |
| 114 | + public Map<String, Object> listGroupOrg(@PathVariable String groupId) { | |
| 115 | + Page<OrganGroup> page = getPage(); | |
| 116 | + if(StrUtils.isNotEmpty(groupId)){ | |
| 117 | + page = organGroupMapsService.getOrgList(page,groupId); | |
| 118 | + } | |
| 119 | + return toGridData(page); | |
| 120 | + } | |
| 83 | 121 | |
| 84 | 122 | } |
parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysOrganizationsController.java
View file @
24d0e2c
| ... | ... | @@ -65,6 +65,9 @@ |
| 65 | 65 | String provinceId = organizations.getProvinceId(); |
| 66 | 66 | String cityId = organizations.getCityId(); |
| 67 | 67 | String areaId = organizations.getAreaId(); |
| 68 | + if(StringUtils.isNotBlank(organizations.getName())){ | |
| 69 | + ew.where("NAME like {0}", "%"+organizations.getName()+"%"); | |
| 70 | + } | |
| 68 | 71 | if (StringUtils.isNotBlank(provinceId)) { |
| 69 | 72 | ew.where("PROVINCE_ID={0}", provinceId); |
| 70 | 73 | } |
parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysRolesController.java
View file @
24d0e2c
| ... | ... | @@ -64,8 +64,10 @@ |
| 64 | 64 | String id = getParameter("id"); |
| 65 | 65 | String name = getParameter("name"); |
| 66 | 66 | String type = getParameter("type"); |
| 67 | + String orgId = getParameter("orgId"); | |
| 68 | + String grouprgId = getParameter("grouprgId"); | |
| 67 | 69 | if (StrUtils.isNotEmpty(id)) { |
| 68 | - ew.and("id like {0}", name.trim() + "%"); | |
| 70 | + ew.and("id like {0}", id.trim() + "%"); | |
| 69 | 71 | } |
| 70 | 72 | if (StrUtils.isNotEmpty(name)) { |
| 71 | 73 | ew.and("name like {0}", name.trim() + "%"); |
| ... | ... | @@ -73,6 +75,12 @@ |
| 73 | 75 | if (StrUtils.isNotEmpty(type)) { |
| 74 | 76 | ew.and("type={0}", type); |
| 75 | 77 | } |
| 78 | + if (StrUtils.isNotEmpty(orgId)) { | |
| 79 | + ew.and("org_Id={0}", orgId); | |
| 80 | + } | |
| 81 | + if (StrUtils.isNotEmpty(grouprgId)) { | |
| 82 | + ew.and("grouprg_Id={0}", grouprgId); | |
| 83 | + } | |
| 76 | 84 | return toGridData(sysRolesService.selectPage(page, ew)); |
| 77 | 85 | } |
| 78 | 86 | |
| ... | ... | @@ -88,7 +96,7 @@ |
| 88 | 96 | model.addAttribute("role", role); |
| 89 | 97 | // 当前用户权限数据 |
| 90 | 98 | List<RolePermissionMaps> rpList = sysRolePermissionMapsService |
| 91 | - .selectList(new EntityWrapper<RolePermissionMaps>().where("role_id={0}", "'" + id + "'")); | |
| 99 | + .selectList(new EntityWrapper<RolePermissionMaps>().where("role_id={0}",id)); | |
| 92 | 100 | StringBuilder permissionSB = new StringBuilder(); |
| 93 | 101 | for (RolePermissionMaps rpEntity : rpList) { |
| 94 | 102 | permissionSB.append("," + rpEntity.getPermissionId()); |
parent/center.manager/src/main/java/com/lyms/cm/controller/sys/SysUsersController.java
View file @
24d0e2c
| ... | ... | @@ -94,6 +94,8 @@ |
| 94 | 94 | String searchName = getParameter("name"); |
| 95 | 95 | String searchAccount = getParameter("account"); |
| 96 | 96 | String searchPhone = getParameter("phone"); |
| 97 | + String searchOrgId = getParameter("orgId"); | |
| 98 | + String searchDeptId = getParameter("deptId"); | |
| 97 | 99 | if (StrUtils.isNotEmpty(searchName)) { |
| 98 | 100 | ew.and("name like {0}", searchName.trim() + "%"); |
| 99 | 101 | } |
| ... | ... | @@ -103,6 +105,12 @@ |
| 103 | 105 | if (StrUtils.isNotEmpty(searchPhone)) { |
| 104 | 106 | ew.and("phone like {0}", searchPhone.trim() + "%"); |
| 105 | 107 | } |
| 108 | + if (StrUtils.isNotEmpty(searchOrgId)) { | |
| 109 | + ew.and("org_id = {0}", searchOrgId.trim() ); | |
| 110 | + } | |
| 111 | + if (StrUtils.isNotEmpty(searchDeptId)) { | |
| 112 | + ew.and("dept_Id = {0}", searchDeptId.trim() ); | |
| 113 | + } | |
| 106 | 114 | page = userService.selectPage(page, ew); |
| 107 | 115 | return toGridData(page); |
| 108 | 116 | } |
| ... | ... | @@ -119,7 +127,7 @@ |
| 119 | 127 | model.addAttribute("user", user); |
| 120 | 128 | // 当前用户角色数据 |
| 121 | 129 | List<UserRoleMaps> urList = sysUserRoleMapsService |
| 122 | - .selectList(new EntityWrapper<UserRoleMaps>().where("user_id={0}", "'" + id + "'")); | |
| 130 | + .selectList(new EntityWrapper<UserRoleMaps>().where("user_id={0}", id )); | |
| 123 | 131 | StringBuilder urSB = new StringBuilder(); |
| 124 | 132 | for (UserRoleMaps urEntity : urList) { |
| 125 | 133 | urSB.append("," + urEntity.getRoleId()); |
parent/center.manager/src/main/resources/xml/app-timer.xml
View file @
24d0e2c
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | |
| 15 | 15 | <!-- 同步远程数据, 定时任务处理同步任务 --> |
| 16 | 16 | <task:scheduled-tasks> |
| 17 | - <task:scheduled ref="syncTmpJob" method="excute" cron="*/10 * * * * ?"/> | |
| 17 | + <!-- <task:scheduled ref="syncTmpJob" method="excute" cron="*/10 * * * * ?"/> --> | |
| 18 | 18 | <task:scheduled ref="syncFixJob" method="excute" cron="*/30 * * * * ?"/> |
| 19 | 19 | </task:scheduled-tasks> |
| 20 | 20 |
parent/center.manager/src/main/webapp/WEB-INF/views/depart/depart_edit.html
View file @
24d0e2c
| ... | ... | @@ -4,27 +4,33 @@ |
| 4 | 4 | <form id="validForm" class="form-horizontal m-t" novalidate="novalidate"> |
| 5 | 5 | <input type="hidden" id="depart.id" name="id" value="$!depart.id"/> |
| 6 | 6 | <div class="form-group"> |
| 7 | - <label class="col-sm-3 control-label">名称:</label> | |
| 7 | + <label class="col-sm-3 control-label">科室名称:</label> | |
| 8 | 8 | <div class="col-sm-8"> |
| 9 | - <input type="text" placeholder="部门名称" value="$!depart.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name"> | |
| 9 | + <input type="text" placeholder="科室名称" value="$!depart.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name"> | |
| 10 | 10 | </div> |
| 11 | 11 | </div> |
| 12 | 12 | |
| 13 | 13 | <div class="form-group"> |
| 14 | - <label class="col-sm-3 control-label">机构:</label> | |
| 14 | + <label class="col-sm-3 control-label">医院id:</label> | |
| 15 | 15 | <div class="col-sm-8"> |
| 16 | + <input type="text" placeholder="医院id" value="$!depart.orgId" aria-required="true" required="true" class="form-control" minlength="2" name="orgId" id="orgId"> | |
| 17 | + <!-- | |
| 16 | 18 | <select class="form-control" name="orgId" id="orgs"> |
| 17 | 19 | <option value="0">--选择--</option> |
| 18 | 20 | </select> |
| 21 | + --> | |
| 19 | 22 | </div> |
| 20 | 23 | </div> |
| 21 | 24 | |
| 22 | 25 | <div class="form-group"> |
| 23 | - <label class="col-sm-3 control-label">上级部门:</label> | |
| 26 | + <label class="col-sm-3 control-label">上级科室id:</label> | |
| 24 | 27 | <div class="col-sm-8"> |
| 28 | + <input type="text" placeholder="上级科室id" value="$!depart.parentId" aria-required="true" required="true" class="form-control" minlength="2" name="parentId" id="parentId"> | |
| 29 | + <!-- | |
| 25 | 30 | <select class="form-control" name="parentId" id="parent"> |
| 26 | 31 | <option value="0">--选择--</option> |
| 27 | 32 | </select> |
| 33 | + --> | |
| 28 | 34 | </div> |
| 29 | 35 | </div> |
| 30 | 36 |
parent/center.manager/src/main/webapp/WEB-INF/views/depart/depart_list.html
View file @
24d0e2c
| ... | ... | @@ -4,14 +4,18 @@ |
| 4 | 4 | <div style="padding-top:30px;"> |
| 5 | 5 | <form role="form" class="form-inline"> |
| 6 | 6 | <div class="form-group" id="leve"> |
| 7 | - <span class="form-control">机构组</span> | |
| 8 | - <input type="text" placeholder="请输入机构组名称" id="usernameSearch" class="form-control"> | |
| 7 | + <span class="form-control">医院id</span> | |
| 8 | + <input type="text" placeholder="医院id" id="searchOrgId" class="form-control"> | |
| 9 | 9 | </div> |
| 10 | + <div class="form-group" id="leve"> | |
| 11 | + <span class="form-control">科室名称</span> | |
| 12 | + <input type="text" placeholder="科室名称" id="searchName" class="form-control"> | |
| 13 | + </div> | |
| 10 | 14 | </form> |
| 11 | 15 | </div> |
| 12 | 16 | </div> |
| 13 | 17 | <div class="col-sm-2"> |
| 14 | - <div class="title-action"> | |
| 18 | + <div class="title-action" onclick="search();"> | |
| 15 | 19 | <a class="btn btn-primary"><i class="fa fa-search"></i> 查询</a> |
| 16 | 20 | </div> |
| 17 | 21 | </div> |
| 18 | 22 | |
| 19 | 23 | |
| ... | ... | @@ -33,15 +37,24 @@ |
| 33 | 37 | <script type="text/javascript"> |
| 34 | 38 | |
| 35 | 39 | var controllerRequestMappint = "/sysDepartments/"; |
| 40 | +function search(){ | |
| 41 | + var queryParams = { | |
| 42 | + query:{ | |
| 43 | + name: $("#searchName").val(), | |
| 44 | + orgId: $("#searchOrgId").val() | |
| 45 | + } | |
| 46 | + } | |
| 47 | + $('#dataTable').bootstrapTable('refresh', queryParams ); | |
| 48 | +} | |
| 36 | 49 | |
| 37 | 50 | function add() { |
| 38 | - popWindow("添加部门/科室", APP.PATH + controllerRequestMappint + "/toEdit?orgId=",700,550); | |
| 51 | + popWindow("添加科室/科室", APP.PATH + controllerRequestMappint + "/toEdit?orgId=",700,550); | |
| 39 | 52 | } |
| 40 | 53 | |
| 41 | 54 | function edit(){ |
| 42 | 55 | var id = getSingleSelectedValue("dataTable","id"); |
| 43 | 56 | if(id){ |
| 44 | - popWindow("修改部门/科室", APP.PATH + controllerRequestMappint + "toEdit?id="+id,700,550); | |
| 57 | + popWindow("修改科室/科室", APP.PATH + controllerRequestMappint + "toEdit?id="+id,700,550); | |
| 45 | 58 | } |
| 46 | 59 | } |
| 47 | 60 | |
| 48 | 61 | |
| 49 | 62 | |
| ... | ... | @@ -60,13 +73,13 @@ |
| 60 | 73 | title: '编号' |
| 61 | 74 | },{ |
| 62 | 75 | field: 'name', |
| 63 | - title: '名称' | |
| 76 | + title: '科室名称' | |
| 64 | 77 | },{ |
| 65 | 78 | field: 'orgId', |
| 66 | - title: '机构' | |
| 79 | + title: '医院' | |
| 67 | 80 | },{ |
| 68 | 81 | field: 'parentId', |
| 69 | - title: '上级部门' | |
| 82 | + title: '上级科室' | |
| 70 | 83 | },{ |
| 71 | 84 | field: 'shortCode', |
| 72 | 85 | title: '简码' |
parent/center.manager/src/main/webapp/WEB-INF/views/group/group_edit.html
View file @
24d0e2c
| ... | ... | @@ -7,7 +7,7 @@ |
| 7 | 7 | <div class="form-group"> |
| 8 | 8 | <label class="col-sm-3 control-label">组名称:</label> |
| 9 | 9 | <div class="col-sm-8"> |
| 10 | - <input type="text" placeholder="机构名称" value="$!group.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name"> | |
| 10 | + <input type="text" placeholder="医院名称" value="$!group.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name"> | |
| 11 | 11 | </div> |
| 12 | 12 | </div> |
| 13 | 13 | <div class="form-group"> |
| ... | ... | @@ -28,7 +28,14 @@ |
| 28 | 28 | <input type="text" value="$!group.clientaddress" placeholder="连接地址" aria-required="true" required="true" minlength="3" name="clientaddress" class="form-control" id="shortCode"> |
| 29 | 29 | </div> |
| 30 | 30 | </div> |
| 31 | - | |
| 31 | + <div class="form-group"> | |
| 32 | + <label class="col-sm-3 control-label">医院列表:</label> | |
| 33 | + <button class="btn btn-info " type="button" onclick="del();"><i class="fa fa-trash"></i> 移除</button> | |
| 34 | + </div> | |
| 35 | + <div class="form-group"> | |
| 36 | + <input type="hidden" id="orgIds" name="orgIds"/> | |
| 37 | + <table id="orgList"></table> | |
| 38 | + </div> | |
| 32 | 39 | <div class="hr-line-dashed"></div> |
| 33 | 40 | <div class="form-group"> |
| 34 | 41 | <div class="col-sm-4 col-sm-offset-3 pull-right"> |
| 35 | 42 | |
| 36 | 43 | |
| ... | ... | @@ -38,13 +45,62 @@ |
| 38 | 45 | </div> |
| 39 | 46 | </form> |
| 40 | 47 | </div> |
| 41 | - <!-- 机构组拥有机构 --> | |
| 48 | + <!-- 医院组拥有医院 --> | |
| 42 | 49 | <div class="col-sm-8"> |
| 43 | - <table id="dataTable"></table> | |
| 44 | - </div> | |
| 50 | + <div style="padding-top:30px;"> | |
| 51 | + <form class="form-inline"> | |
| 52 | + <div class="form-group"> | |
| 53 | + <input type="text" placeholder="请输入医院名过滤" id="groupName" name="groupName" class="form-control"> | |
| 54 | + </div> | |
| 55 | + <div class="form-group" onclick="search();"> | |
| 56 | + <a class="btn btn-primary"><i class="fa fa-search"></i> 查询</a> | |
| 57 | + </div> | |
| 58 | + <div class="form-group" onclick="add();"> | |
| 59 | + <a class="btn btn-primary"><i class="fa fa-plus"></i> 添加</a> | |
| 60 | + </div> | |
| 61 | + </form> | |
| 62 | + </div> | |
| 63 | + <table id="dataTable"></table> | |
| 45 | 64 | </div> |
| 46 | 65 | </div> |
| 47 | 66 | <script type="text/javascript"> |
| 67 | +function search(){ | |
| 68 | + var queryParams = { | |
| 69 | + query:{ | |
| 70 | + name: $("#groupName").val() | |
| 71 | + } | |
| 72 | + } | |
| 73 | + $('#dataTable').bootstrapTable('refresh', queryParams ); | |
| 74 | +} | |
| 75 | +function add(){ | |
| 76 | + var list = $('#dataTable').bootstrapTable('getSelections'); | |
| 77 | + for(var i = 0 ; i< list.length ; i++){ | |
| 78 | + if(! $('#orgList').bootstrapTable('getRowByUniqueId', list[i]['id'])){ | |
| 79 | + var row = []; | |
| 80 | + row.push({ | |
| 81 | + id: list[i]['id'], | |
| 82 | + name: list[i]['name'] | |
| 83 | + }); | |
| 84 | + $('#orgList').bootstrapTable('append', row); | |
| 85 | + } | |
| 86 | + } | |
| 87 | + $('#orgIds').val(getOrgIds()); | |
| 88 | +} | |
| 89 | +function del(){ | |
| 90 | + var list = $('#orgList').bootstrapTable('getSelections'); | |
| 91 | + for(var i = 0 ; i< list.length ; i++){ | |
| 92 | + $('#orgList').bootstrapTable('remove', {field: 'id', values: list[i]['id']}); | |
| 93 | + } | |
| 94 | + $('#orgIds').val(getOrgIds()); | |
| 95 | +} | |
| 96 | +function getOrgIds(){ | |
| 97 | + var list = $('#orgList').bootstrapTable('getData'); | |
| 98 | + var ids = []; | |
| 99 | + for(var i = 0 ;i < list.length ;i++){ | |
| 100 | + ids.push(list[i]['id']); | |
| 101 | + } | |
| 102 | + return ids.join(','); | |
| 103 | +} | |
| 48 | 104 | function save(){ |
| 49 | 105 | if($('#validForm').valid()){ |
| 50 | 106 | var data = $('#validForm').serialize(); |
| ... | ... | @@ -137,4 +193,80 @@ |
| 137 | 193 | </script> |
| 138 | 194 | #end |
| 139 | 195 | #extends("/common/base_list.html") |
| 196 | + | |
| 197 | +<script type="text/javascript"> | |
| 198 | +//拥有医院列表 | |
| 199 | +$(function () { | |
| 200 | + var orgListTable = new orgLostTableInit(); | |
| 201 | + orgListTable.Init(); | |
| 202 | +}) | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | +var orgLostTableInit = function () { | |
| 207 | + var orgListTableInit = new Object(); | |
| 208 | + //初始化Table | |
| 209 | + orgListTableInit.Init = function () { | |
| 210 | + $('#orgList').bootstrapTable({ | |
| 211 | + url: '${ctx}/sysOrganGroup/listGroupOrg/$!group.id', //请求后台的URL(*) | |
| 212 | + method: 'get', //请求方式(*) | |
| 213 | + striped: true, //是否显示行间隔色 | |
| 214 | + cache: false, //是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) | |
| 215 | + sortable: false, //是否启用排序 | |
| 216 | + queryParams: orgListTableInit.queryParams,//传递参数(*) | |
| 217 | + sidePagination: "server", //分页方式:client客户端分页,server服务端分页(*) | |
| 218 | + pageNumber:1, //初始化加载第一页,默认第一页 | |
| 219 | + pageSize: 999, //每页的记录行数(*) | |
| 220 | + pageList: [999], //可供选择的每页的行数(*) | |
| 221 | + strictSearch: true, | |
| 222 | + clickToSelect: true, //是否启用点击选中行 | |
| 223 | + //height: 600, //行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 | |
| 224 | + uniqueId: "id", //每一行的唯一标识,一般为主键列 | |
| 225 | + cardView: false, //是否显示详细视图 | |
| 226 | + detailView: false, //是否显示父子表 | |
| 227 | + columns: [{ | |
| 228 | + field: 'check_state', | |
| 229 | + title: '', | |
| 230 | + checkbox: true | |
| 231 | + },{ | |
| 232 | + field: 'id', | |
| 233 | + title: '序号', | |
| 234 | + visible: false | |
| 235 | + }, { | |
| 236 | + field: 'name', | |
| 237 | + title: '医院名称' | |
| 238 | + }], | |
| 239 | + onLoadSuccess: function(){ //加载成功时执行 | |
| 240 | + var list = $('#orgList').bootstrapTable('getData'); | |
| 241 | + var ids = []; | |
| 242 | + for(var i = 0 ;i< list.length ; i++ ){ | |
| 243 | + ids.push(list[i]['id']); | |
| 244 | + } | |
| 245 | + $('#orgIds').val(ids.join(',')); | |
| 246 | + } | |
| 247 | + }); | |
| 248 | + }; | |
| 249 | + | |
| 250 | + //得到查询的参数 | |
| 251 | + orgListTableInit.queryParams = function (params) { | |
| 252 | + var temp = { //这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的 | |
| 253 | + _size: 999, //每页记录数 | |
| 254 | + _offset: 1 , //偏移量 | |
| 255 | + /*sdate: $("#stratTime").val(), | |
| 256 | + edate: $("#endTime").val(), | |
| 257 | + sellerid: $("#sellerid").val(), | |
| 258 | + orderid: $("#orderid").val(), | |
| 259 | + CardNumber: $("#CardNumber").val(), | |
| 260 | + maxrows: params.limit, | |
| 261 | + pageindex: params.pageNumber, | |
| 262 | + portid: $("#portid").val(), | |
| 263 | + CardNumber: $("#CardNumber").val(), | |
| 264 | + tradetype: $('input:radio[name="tradetype"]:checked').val(), | |
| 265 | + success: $('input:radio[name="success"]:checked').val(),*/ | |
| 266 | + }; | |
| 267 | + return temp; | |
| 268 | + }; | |
| 269 | + return orgListTableInit; | |
| 270 | +}; | |
| 271 | +</script> |
parent/center.manager/src/main/webapp/WEB-INF/views/group/group_list.html
View file @
24d0e2c
| 1 | 1 | #override("body") |
| 2 | 2 | |
| 3 | -<div class="ibox float-e-margins"> | |
| 4 | - <div class="rows" style="width: 100%"> | |
| 5 | - <div class="col-sm-10"> | |
| 6 | - <div class="row wrapper border-bottom white-bg page-heading"> | |
| 7 | - <div class="col-sm-4"> | |
| 8 | - <div style="padding-top:30px;"> | |
| 9 | - <form role="form" class="form-inline"> | |
| 10 | - <div class="form-group"> | |
| 11 | - <span class="form-control"> 机构组</span> | |
| 12 | - <input type="text" placeholder="请输入机构组名称" id="usernameSearch" class="form-control"> | |
| 13 | - </div> | |
| 14 | - </form> | |
| 15 | - </div> | |
| 16 | - </div> | |
| 17 | - | |
| 18 | - <div class="col-sm-2"> | |
| 19 | - <div class="title-action"> | |
| 20 | - <a class="btn btn-primary"><i class="fa fa-search"></i> 查询</a> | |
| 21 | - </div> | |
| 22 | - </div> | |
| 23 | - </div> | |
| 24 | - <div class="wrapper wrapper-content"> | |
| 25 | - <div class="row"> | |
| 26 | - <div class="col-sm-12"> | |
| 27 | - <div id="toolbar"> | |
| 28 | - <button class="btn btn-info " type="button" onclick="add();"><i class="fa fa-plus"></i> 新增</button> | |
| 29 | - <button class="btn btn-info " type="button" onclick="edit();"><i class="fa fa-paste"></i> 编辑</button> | |
| 30 | - <button class="btn btn-info " type="button" onclick="del();"><i class="fa fa-trash"></i> 删除</button> | |
| 31 | - </div> | |
| 32 | - <table id="dataTable"></table> | |
| 33 | - </div> | |
| 34 | - </div> | |
| 35 | - </div> | |
| 36 | - </div> | |
| 3 | +<div class="ibox float-e-margins"><div class="row wrapper border-bottom white-bg page-heading"> | |
| 4 | + <div class="col-sm-10"> | |
| 5 | + <div style="padding-top:30px;"> | |
| 6 | + <form role="form" class="form-inline"> | |
| 7 | + <div class="form-group"> | |
| 8 | + <input type="text" placeholder="角色名" id="searchName" class="form-control"> | |
| 9 | + </div> | |
| 10 | + <div class="form-group"> | |
| 11 | + <select class="form-control m-b" name="type" id="searchType" style="margin-bottom: 0;"> | |
| 12 | + <option value="">所有</option> | |
| 13 | + <option value="1">用户角色</option> | |
| 14 | + <option value="0">管理员角色</option> | |
| 15 | + </select> | |
| 16 | + </div> | |
| 17 | + <div class="form-group"> | |
| 18 | + <input type="text" placeholder="角色id编号" id="searchId" class="form-control"> | |
| 19 | + </div> | |
| 20 | + </form> | |
| 21 | + </div> | |
| 37 | 22 | </div> |
| 23 | + <div class="col-sm-2"> | |
| 24 | + <div class="title-action" onclick="search();"> | |
| 25 | + <a class="btn btn-primary"><i class="fa fa-search"></i> 查询</a> | |
| 26 | + </div> | |
| 27 | + </div> | |
| 38 | 28 | </div> |
| 29 | +<div class="wrapper wrapper-content"> | |
| 30 | + <div class="row"> | |
| 31 | + <div class="col-sm-12"> | |
| 32 | + <div id="toolbar"> | |
| 33 | + <button class="btn btn-info " type="button" onclick="add();"><i class="fa fa-plus"></i> 新增</button> | |
| 34 | + <button class="btn btn-info " type="button" onclick="edit();"><i class="fa fa-paste"></i> 编辑</button> | |
| 35 | + <button class="btn btn-info " type="button" onclick="del();"><i class="fa fa-trash"></i> 删除</button> | |
| 36 | + </div> | |
| 37 | + <table id="dataTable"></table> | |
| 38 | + </div> | |
| 39 | + </div> | |
| 40 | +</div> | |
| 39 | 41 | #end |
| 40 | 42 | #override("js") |
| 41 | 43 | <script type="text/javascript"> |
| 42 | 44 | |
| ... | ... | @@ -43,13 +45,13 @@ |
| 43 | 45 | var controllerRequestMappint = "/sysOrganGroup/"; |
| 44 | 46 | |
| 45 | 47 | function add() { |
| 46 | - fullWindow("新增机构组", APP.PATH + controllerRequestMappint + "0/toEdit"); | |
| 48 | + fullWindow("新增医院组", APP.PATH + controllerRequestMappint + "0/toEdit"); | |
| 47 | 49 | } |
| 48 | 50 | |
| 49 | 51 | function edit(){ |
| 50 | 52 | var id = getSingleSelectedValue("dataTable","id"); |
| 51 | 53 | if(id){ |
| 52 | - fullWindow("修改机构组", APP.PATH + controllerRequestMappint + id + "/toEdit"); | |
| 54 | + fullWindow("修改医院组", APP.PATH + controllerRequestMappint + id + "/toEdit"); | |
| 53 | 55 | } |
| 54 | 56 | } |
| 55 | 57 | |
| ... | ... | @@ -74,7 +76,7 @@ |
| 74 | 76 | title: '建档方式' |
| 75 | 77 | },{ |
| 76 | 78 | field: 'orgnumber', |
| 77 | - title: '机构数' | |
| 79 | + title: '医院数' | |
| 78 | 80 | },{ |
| 79 | 81 | field: 'clientaddress', |
| 80 | 82 | title: '连接地址' |
parent/center.manager/src/main/webapp/WEB-INF/views/organ/org_edit.html
View file @
24d0e2c
| ... | ... | @@ -6,7 +6,7 @@ |
| 6 | 6 | <div class="form-group"> |
| 7 | 7 | <label class="col-sm-3 control-label">名称:</label> |
| 8 | 8 | <div class="col-sm-8"> |
| 9 | - <input type="text" placeholder="机构名称" value="$!org.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name"> | |
| 9 | + <input type="text" placeholder="医院名称" value="$!org.name" aria-required="true" required="true" class="form-control" minlength="2" name="name" id="name"> | |
| 10 | 10 | </div> |
| 11 | 11 | </div> |
| 12 | 12 | <div class="form-group"> |
parent/center.manager/src/main/webapp/WEB-INF/views/organ/org_list.html
View file @
24d0e2c
| ... | ... | @@ -3,13 +3,14 @@ |
| 3 | 3 | <div class="col-sm-10"> |
| 4 | 4 | <div style="padding-top:30px;"> |
| 5 | 5 | <form role="form" class="form-inline"> |
| 6 | + <!-- | |
| 6 | 7 | <div class="form-group" id="leve"> |
| 7 | 8 | <span class="form-control">所属区域</span> |
| 8 | 9 | #extends("/organ/org.html") |
| 9 | 10 | </div> |
| 10 | - | |
| 11 | + --> | |
| 11 | 12 | <div class="form-group"> |
| 12 | - <input type="text" placeholder="请输入机构名" id="usernameSearch" class="form-control"> | |
| 13 | + <input type="text" placeholder="请输入医院名" id="usernameSearch" class="form-control"> | |
| 13 | 14 | </div> |
| 14 | 15 | <!-- <div class="form-group"> |
| 15 | 16 | <input type="text" placeholder="请输入ID" id="idSearch" class="form-control"> |
| 16 | 17 | |
| ... | ... | @@ -42,13 +43,13 @@ |
| 42 | 43 | var controllerRequestMappint = "/sysOrganizations/"; |
| 43 | 44 | |
| 44 | 45 | function add() { |
| 45 | - popWindow("添加结构", APP.PATH + controllerRequestMappint + "/toEdit?orgId=",700,550); | |
| 46 | + fullWindow("添加医院", APP.PATH + controllerRequestMappint + "/toEdit?orgId="); | |
| 46 | 47 | } |
| 47 | 48 | |
| 48 | 49 | function edit(){ |
| 49 | 50 | var id = getSingleSelectedValue("dataTable","id"); |
| 50 | 51 | if(id){ |
| 51 | - popWindow("修改机构", APP.PATH + controllerRequestMappint + "toEdit?orgId="+id,700,550); | |
| 52 | + fullWindow("修改医院", APP.PATH + controllerRequestMappint + "toEdit?orgId="+id); | |
| 52 | 53 | } |
| 53 | 54 | } |
| 54 | 55 |
parent/center.manager/src/main/webapp/WEB-INF/views/role/role_edit.html
View file @
24d0e2c
| ... | ... | @@ -141,9 +141,15 @@ |
| 141 | 141 | </div> |
| 142 | 142 | </div> |
| 143 | 143 | <div class="form-group"> |
| 144 | - <label class="col-sm-3 control-label">所属机构:</label> | |
| 144 | + <label class="col-sm-3 control-label">医院id:</label> | |
| 145 | 145 | <div class="col-sm-8"> |
| 146 | - <input type="text" placeholder="所属机构" value="$!role.orgId" aria-required="true" required="true" class="form-control" minlength="2" name="orgId" id="orgId"> | |
| 146 | + <input type="text" placeholder="医院id" value="$!role.orgId" aria-required="true" required="true" class="form-control" minlength="2" name="orgId" id="orgId"> | |
| 147 | + </div> | |
| 148 | + </div> | |
| 149 | + <div class="form-group"> | |
| 150 | + <label class="col-sm-3 control-label">医院组:</label> | |
| 151 | + <div class="col-sm-8"> | |
| 152 | + <input type="text" placeholder="医院组id" value="$!role.grouporgId" aria-required="true" required="true" class="form-control" minlength="2" name="grouporgId" id="grouporgId"> | |
| 147 | 153 | </div> |
| 148 | 154 | </div> |
| 149 | 155 | <div class="form-group"> |
parent/center.manager/src/main/webapp/WEB-INF/views/role/role_list.html
View file @
24d0e2c
| ... | ... | @@ -7,6 +7,12 @@ |
| 7 | 7 | <input type="text" placeholder="角色名" id="searchName" class="form-control"> |
| 8 | 8 | </div> |
| 9 | 9 | <div class="form-group"> |
| 10 | + <input type="text" placeholder="医院id" id="searchOrgId" class="form-control"> | |
| 11 | + </div> | |
| 12 | + <div class="form-group"> | |
| 13 | + <input type="text" placeholder="医院组id" id="searchGrouporgId" class="form-control"> | |
| 14 | + </div> | |
| 15 | + <div class="form-group"> | |
| 10 | 16 | <select class="form-control m-b" name="type" id="searchType" style="margin-bottom: 0;"> |
| 11 | 17 | <option value="">所有</option> |
| 12 | 18 | <option value="1">用户角色</option> |
| ... | ... | @@ -14,7 +20,7 @@ |
| 14 | 20 | </select> |
| 15 | 21 | </div> |
| 16 | 22 | <div class="form-group"> |
| 17 | - <input type="text" placeholder="角色id编号" id="searchId" class="form-control"> | |
| 23 | + <input type="text" placeholder="编号" id="searchId" class="form-control"> | |
| 18 | 24 | </div> |
| 19 | 25 | </form> |
| 20 | 26 | </div> |
| ... | ... | @@ -47,7 +53,9 @@ |
| 47 | 53 | query:{ |
| 48 | 54 | name: $("#searchName").val(), |
| 49 | 55 | id: $("#searchId").val(), |
| 50 | - type: $("#searchType").val() | |
| 56 | + type: $("#searchType").val(), | |
| 57 | + orgId: $("#searchOrgId").val(), | |
| 58 | + grouporgId: $("#searchGrouporgId").val(), | |
| 51 | 59 | } |
| 52 | 60 | } |
| 53 | 61 | $('#dataTable').bootstrapTable('refresh', queryParams ); |
| ... | ... | @@ -91,7 +99,10 @@ |
| 91 | 99 | title: '备注' |
| 92 | 100 | },{ |
| 93 | 101 | field: 'orgId', |
| 94 | - title: '机构id' | |
| 102 | + title: '医院id' | |
| 103 | + },{ | |
| 104 | + field: 'grouporgId', | |
| 105 | + title: '医院组id' | |
| 95 | 106 | },{ |
| 96 | 107 | field: 'enable', |
| 97 | 108 | title: '启/停用', |
parent/center.manager/src/main/webapp/WEB-INF/views/role/tree_test.html
View file @
24d0e2c
| ... | ... | @@ -166,9 +166,9 @@ |
| 166 | 166 | </div> |
| 167 | 167 | </div> |
| 168 | 168 | <div class="form-group"> |
| 169 | - <label class="col-sm-3 control-label">所属机构:</label> | |
| 169 | + <label class="col-sm-3 control-label">所属医院:</label> | |
| 170 | 170 | <div class="col-sm-8"> |
| 171 | - <input type="text" placeholder="所属机构" value="$!role.orgId" aria-required="true" required="true" class="form-control" minlength="2" name="orgId" id="orgId"> | |
| 171 | + <input type="text" placeholder="所属医院" value="$!role.orgId" aria-required="true" required="true" class="form-control" minlength="2" name="orgId" id="orgId"> | |
| 172 | 172 | </div> |
| 173 | 173 | </div> |
| 174 | 174 | <div class="form-group"> |
parent/center.manager/src/main/webapp/WEB-INF/views/user/user_edit.html
View file @
24d0e2c
| ... | ... | @@ -142,15 +142,15 @@ |
| 142 | 142 | </div> |
| 143 | 143 | </div> |
| 144 | 144 | <div class="form-group"> |
| 145 | - <label class="col-sm-3 control-label">机构:</label> | |
| 145 | + <label class="col-sm-3 control-label">医院id:</label> | |
| 146 | 146 | <div class="col-sm-8"> |
| 147 | - <input type="text" placeholder="所属机构" value="$!user.orgId" aria-required="true" required="true" class="form-control" minlength="2" name="orgId" id="orgId"> | |
| 147 | + <input type="text" placeholder="医院id" value="$!user.orgId" aria-required="true" required="true" class="form-control" minlength="2" name="orgId" id="orgId"> | |
| 148 | 148 | </div> |
| 149 | 149 | </div> |
| 150 | 150 | <div class="form-group"> |
| 151 | - <label class="col-sm-3 control-label">部门:</label> | |
| 151 | + <label class="col-sm-3 control-label">科室id:</label> | |
| 152 | 152 | <div class="col-sm-8"> |
| 153 | - <input type="text" placeholder="所属部门" value="$!user.deptId" aria-required="true" required="true" class="form-control" minlength="2" name="deptId" id="deptId"> | |
| 153 | + <input type="text" placeholder="科室id" value="$!user.deptId" aria-required="true" required="true" class="form-control" minlength="2" name="deptId" id="deptId"> | |
| 154 | 154 | </div> |
| 155 | 155 | </div> |
| 156 | 156 | <div class="form-group"> |
parent/center.manager/src/main/webapp/WEB-INF/views/user/user_list.html
View file @
24d0e2c
| ... | ... | @@ -12,6 +12,12 @@ |
| 12 | 12 | <div class="form-group"> |
| 13 | 13 | <input type="text" placeholder="手机号" id="searchPhone" class="form-control"> |
| 14 | 14 | </div> |
| 15 | + <div class="form-group"> | |
| 16 | + <input type="text" placeholder="医院id" id="searchOrgId" class="form-control"> | |
| 17 | + </div> | |
| 18 | + <div class="form-group"> | |
| 19 | + <input type="text" placeholder="科室id" id="searchDeptId" class="form-control"> | |
| 20 | + </div> | |
| 15 | 21 | </form> |
| 16 | 22 | </div> |
| 17 | 23 | </div> |
| ... | ... | @@ -42,7 +48,9 @@ |
| 42 | 48 | query:{ |
| 43 | 49 | name: $("#searchName").val(), |
| 44 | 50 | account: $("#searchAccount").val(), |
| 45 | - phone: $("#searchPhone").val() | |
| 51 | + phone: $("#searchPhone").val(), | |
| 52 | + orgId: $("#searchOrgId").val() | |
| 53 | + deptId: $("#searchdeptId").val() | |
| 46 | 54 | } |
| 47 | 55 | } |
| 48 | 56 | $('#dataTable').bootstrapTable('refresh', queryParams ); |
| 49 | 57 | |
| ... | ... | @@ -77,10 +85,10 @@ |
| 77 | 85 | title: '帐号' |
| 78 | 86 | },{ |
| 79 | 87 | field: 'orgId', |
| 80 | - title: '机构' | |
| 88 | + title: '医院' | |
| 81 | 89 | },{ |
| 82 | 90 | field: 'deptId', |
| 83 | - title: '部门' | |
| 91 | + title: '科室' | |
| 84 | 92 | },{ |
| 85 | 93 | field: 'phone', |
| 86 | 94 | title: '手机号' |
parent/center.manager/src/test/java/center/manager/test/user/WorkTest.java
View file @
24d0e2c
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | import org.junit.Test; |
| 5 | 5 | import org.springframework.beans.factory.annotation.Autowired; |
| 6 | 6 | |
| 7 | +import com.lyms.sync.ParamsAdpter; | |
| 7 | 8 | import com.lyms.sync.SyncCallback; |
| 8 | 9 | import com.lyms.sync.SyncCenter; |
| 9 | 10 | import com.lyms.sync.channel.ChannelData; |
| ... | ... | @@ -32,7 +33,7 @@ |
| 32 | 33 | @Test |
| 33 | 34 | public void pushFix() { |
| 34 | 35 | String id = StrUtils.uuid(); |
| 35 | - String remote = "http://127.0.0.1:9090/hospital.web/remote/sycn"; | |
| 36 | + String remote = "http://127.0.0.1:8080/hospital.web/remote/sycn"; | |
| 36 | 37 | String remoteClazz = "com.lyms.hospital.service.sys.impl.SyncDataBasicServiceImpl"; |
| 37 | 38 | String remoteMethod = "selectOne"; |
| 38 | 39 | center.pushFix(id, remote, remoteClazz, remoteMethod, null); |
| ... | ... | @@ -55,6 +56,7 @@ |
| 55 | 56 | // 参数构建如下注释方式 |
| 56 | 57 | // ParamsAdpter adpter = |
| 57 | 58 | // ParamsAdpter.builder().push(null).push(null).push(null);; |
| 59 | + //ParamsAdpter adpter = ParamsAdpter.builder().push("ddd").push(User) | |
| 58 | 60 | center.pushFix(id, remote, remoteClazz, remoteMethod, null); |
| 59 | 61 | } |
| 60 | 62 |
parent/core.sdk/src/main/java/com/lyms/sync/SyncCenter.java
View file @
24d0e2c
| ... | ... | @@ -54,7 +54,7 @@ |
| 54 | 54 | * <li>修改时间: |
| 55 | 55 | */ |
| 56 | 56 | public boolean pushFix(String id, String remote, String remoteClazz, String remoteMethod, ParamsAdpter adpter) { |
| 57 | - ChannelData data = new ChannelData(id, remote, remoteClazz, remoteMethod, adpter.toJsonString(), true); | |
| 57 | + ChannelData data = new ChannelData(id, remote, remoteClazz, remoteMethod, adpter ==null ? null :adpter.toJsonString(), true); | |
| 58 | 58 | |
| 59 | 59 | int tag = 0; |
| 60 | 60 | |
| ... | ... | @@ -202,6 +202,7 @@ |
| 202 | 202 | * <li>修改时间: |
| 203 | 203 | */ |
| 204 | 204 | public void backPressure() { |
| 205 | + //TODO tag++ >>handl | |
| 205 | 206 | if (data == null) |
| 206 | 207 | return; |
| 207 | 208 | this.push(data, new SyncCallback() { |
parent/core.sdk/src/main/java/com/lyms/sync/SyncHandler.java
View file @
24d0e2c
parent/core.sdk/src/main/java/com/lyms/sync/queue/SyncQueue.java
View file @
24d0e2c
parent/core.sdk/src/main/java/com/lyms/util/DateUtil.java
View file @
24d0e2c
| 1 | +package com.lyms.util; | |
| 2 | + | |
| 3 | +import java.text.ParseException; | |
| 4 | +import java.text.SimpleDateFormat; | |
| 5 | +import java.util.Calendar; | |
| 6 | +import java.util.Date; | |
| 7 | +import java.util.GregorianCalendar; | |
| 8 | +import java.util.concurrent.locks.Lock; | |
| 9 | +import java.util.concurrent.locks.ReentrantLock; | |
| 10 | + | |
| 11 | +import org.joda.time.DateTime; | |
| 12 | + | |
| 13 | +public class DateUtil { | |
| 14 | + private static Lock lock = new ReentrantLock(); | |
| 15 | + public static SimpleDateFormat dd = new SimpleDateFormat("dd"); | |
| 16 | + public static SimpleDateFormat ymd = new SimpleDateFormat("yyyyMMdd"); | |
| 17 | + public static SimpleDateFormat y_m_d = new SimpleDateFormat("yyyy-MM-dd"); | |
| 18 | + public static SimpleDateFormat md = new SimpleDateFormat("MM-dd"); | |
| 19 | + public static SimpleDateFormat m_d = new SimpleDateFormat("MM/dd"); | |
| 20 | + public static SimpleDateFormat y_m_d_h_m_s = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
| 21 | + public static SimpleDateFormat y_m_d_h_m1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | |
| 22 | + | |
| 23 | + public static SimpleDateFormat y_m_d_h_m = new SimpleDateFormat("yyyyMMddHHmm"); | |
| 24 | + public static SimpleDateFormat yyyyMMddHHmmssSSS = new SimpleDateFormat("yyyyMMddHHmmssSSS"); | |
| 25 | + public static final int DAY_SECONDS = 86399; | |
| 26 | + public static final int DAY_FULL_SECONDS = 86400; | |
| 27 | + | |
| 28 | + public static String getymd() { | |
| 29 | + return y_m_d.format(new Date()); | |
| 30 | + } | |
| 31 | + | |
| 32 | + public static String getymd6() { | |
| 33 | + return ymd.format(new Date()); | |
| 34 | + } | |
| 35 | + | |
| 36 | + public static String getymdhmss() { | |
| 37 | + return yyyyMMddHHmmssSSS.format(new Date()); | |
| 38 | + } | |
| 39 | + | |
| 40 | + public static Integer getDays(Date start, Date end) { | |
| 41 | + Integer days = 0; | |
| 42 | + if (start != null && end != null) { | |
| 43 | + start = getDayStartTime(start); | |
| 44 | + end = getDayStartTime(end); | |
| 45 | + Integer seconds = (int) ((end.getTime() - start.getTime()) / 1000); | |
| 46 | + days = seconds / DAY_FULL_SECONDS; | |
| 47 | + } | |
| 48 | + return days; | |
| 49 | + } | |
| 50 | + | |
| 51 | + public static Integer minute2Index(Date date) { | |
| 52 | + | |
| 53 | + DateTime dt = new DateTime(date.getTime()); | |
| 54 | + return dt.getMinuteOfDay() / 10; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public static Integer getAge(Date birth) { | |
| 58 | + if (null == birth) { | |
| 59 | + return null; | |
| 60 | + } | |
| 61 | + java.util.Calendar calendar = Calendar.getInstance(); | |
| 62 | + Date date = new Date(); | |
| 63 | + calendar.setTime(date); | |
| 64 | + | |
| 65 | + Calendar c1 = Calendar.getInstance(); | |
| 66 | + Calendar c2 = Calendar.getInstance(); | |
| 67 | + c1.setTime(date); | |
| 68 | + c2.setTime(birth); | |
| 69 | + int year1 = c1.get(Calendar.YEAR); | |
| 70 | + int year2 = c2.get(Calendar.YEAR); | |
| 71 | + | |
| 72 | + int mouth1 = c1.get(Calendar.MONTH);//0当前 | |
| 73 | + int mouth2 = c2.get(Calendar.MONTH);//4 | |
| 74 | + int i = 0; | |
| 75 | + /* if(mouth2-mouth1>=0){ | |
| 76 | + int days1 = c1.get(Calendar.DAY_OF_MONTH);//当前10 | |
| 77 | + int days2 = c2.get(Calendar.DAY_OF_MONTH);//1 | |
| 78 | + if(days1<days2){ | |
| 79 | + i=i-1; | |
| 80 | + }else if(days1>days2){ | |
| 81 | + } | |
| 82 | + }else if(mouth1-mouth2<0){ | |
| 83 | + i=i-1; | |
| 84 | + }*/ | |
| 85 | + | |
| 86 | + if (mouth2 == mouth1) { | |
| 87 | + int days1 = c1.get(Calendar.DAY_OF_MONTH);//当前10 | |
| 88 | + int days2 = c2.get(Calendar.DAY_OF_MONTH);//1 | |
| 89 | + if (days1 < days2) { | |
| 90 | + i = i - 1; | |
| 91 | + } else if (days1 > days2) { | |
| 92 | + // i=i-1; | |
| 93 | + } | |
| 94 | + } else if (mouth2 > mouth1) { | |
| 95 | + i = i - 1; | |
| 96 | + } | |
| 97 | + | |
| 98 | + // if (birth == null) { | |
| 99 | + // return null; | |
| 100 | + // } | |
| 101 | + // Date now = new Date(); | |
| 102 | + // long m = now.getTime() - birth.getTime(); | |
| 103 | + // Long age = m / 31536000000L; | |
| 104 | + // return age.intValue(); | |
| 105 | + return (Math.abs(year1 - year2) + i); | |
| 106 | + } | |
| 107 | + | |
| 108 | + public static Integer getAge(Date birth, Date fmDate) { | |
| 109 | + if (birth == null || null == fmDate) { | |
| 110 | + return null; | |
| 111 | + } | |
| 112 | + long m = fmDate.getTime() - birth.getTime(); | |
| 113 | + Long age = m / 31536000000L; | |
| 114 | + return age.intValue(); | |
| 115 | + } | |
| 116 | + | |
| 117 | + public static Integer getWeek(Date date) { | |
| 118 | + if (date == null) { | |
| 119 | + return null; | |
| 120 | + } | |
| 121 | + Date now = new Date(); | |
| 122 | + date = getDayStartTime(date); | |
| 123 | + long m = now.getTime() - date.getTime() + 86400000L; | |
| 124 | + Long week = m / 604800000L; | |
| 125 | + return week.intValue(); | |
| 126 | + } | |
| 127 | + | |
| 128 | + public static Integer getWeek(Date start, Date end) { | |
| 129 | + if (start == null || end == null) { | |
| 130 | + return null; | |
| 131 | + } | |
| 132 | + start = getDayStartTime(start); | |
| 133 | + end = getDayStartTime(end); | |
| 134 | + long m = end.getTime() - start.getTime() + 86400000L; | |
| 135 | + Long week = m / 604800000L; | |
| 136 | + return week.intValue(); | |
| 137 | + } | |
| 138 | + | |
| 139 | + public static Long getStartTime() { | |
| 140 | + Calendar todayStart = Calendar.getInstance(); | |
| 141 | + todayStart.set(Calendar.HOUR_OF_DAY, 0); | |
| 142 | + todayStart.set(Calendar.MINUTE, 0); | |
| 143 | + todayStart.set(Calendar.SECOND, 0); | |
| 144 | + todayStart.set(Calendar.MILLISECOND, 0); | |
| 145 | + return todayStart.getTime().getTime(); | |
| 146 | + } | |
| 147 | + | |
| 148 | + public static Long getEndTime() { | |
| 149 | + Calendar todayEnd = Calendar.getInstance(); | |
| 150 | + todayEnd.set(Calendar.HOUR_OF_DAY, 23); | |
| 151 | + todayEnd.set(Calendar.MINUTE, 59); | |
| 152 | + todayEnd.set(Calendar.SECOND, 59); | |
| 153 | + todayEnd.set(Calendar.MILLISECOND, 999); | |
| 154 | + return todayEnd.getTime().getTime(); | |
| 155 | + } | |
| 156 | + | |
| 157 | + /** | |
| 158 | + * 获取到秒 | |
| 159 | + * | |
| 160 | + * @param date | |
| 161 | + * @return | |
| 162 | + */ | |
| 163 | + public static Integer getSecond(Date date) { | |
| 164 | + if (null == date) { | |
| 165 | + return 0; | |
| 166 | + } | |
| 167 | + long time = date.getTime(); | |
| 168 | + return (int) (time / 1000); | |
| 169 | + } | |
| 170 | + | |
| 171 | + public static Integer getInt() { | |
| 172 | + long time = new Date().getTime(); | |
| 173 | + return (int) (time / 1000); | |
| 174 | + } | |
| 175 | + | |
| 176 | + public static String getYmdhm(int day, int minute) { | |
| 177 | + DateTime dt = new DateTime(); | |
| 178 | + dt = dt.minusMillis(dt.getMillisOfDay()); | |
| 179 | + dt = dt.plusDays(day); | |
| 180 | + dt = dt.plusMinutes(minute); | |
| 181 | + return dt.toString("yyyyMMddHHmm"); | |
| 182 | + } | |
| 183 | + | |
| 184 | + public static Date getYmdhmDate(String s) { | |
| 185 | + if (s == null) { | |
| 186 | + return null; | |
| 187 | + } | |
| 188 | + try { | |
| 189 | + return y_m_d_h_m.parse(s); | |
| 190 | + } catch (Exception e) { | |
| 191 | + return null; | |
| 192 | + } | |
| 193 | + } | |
| 194 | + | |
| 195 | + public static String getymdhm(Date d) { | |
| 196 | + if (d == null) { | |
| 197 | + return null; | |
| 198 | + } | |
| 199 | + try { | |
| 200 | + return y_m_d_h_m.format(d); | |
| 201 | + } catch (Exception e) { | |
| 202 | + return null; | |
| 203 | + } | |
| 204 | + } | |
| 205 | + | |
| 206 | + /** | |
| 207 | + * @return 返回当前年月日字符串 :20131025 | |
| 208 | + */ | |
| 209 | + public static String getYmd() { | |
| 210 | + return ymd.format(new Date()); | |
| 211 | + } | |
| 212 | + | |
| 213 | + public static String getYmd(Date d) { | |
| 214 | + if (d == null) { | |
| 215 | + return null; | |
| 216 | + } | |
| 217 | + try { | |
| 218 | + return ymd.format(d); | |
| 219 | + } catch (Exception e) { | |
| 220 | + return null; | |
| 221 | + } | |
| 222 | + } | |
| 223 | + | |
| 224 | + public static Date parseYMD(String s) { | |
| 225 | + if (s == null) { | |
| 226 | + return null; | |
| 227 | + } | |
| 228 | + | |
| 229 | + try { | |
| 230 | + lock.lock(); | |
| 231 | + return y_m_d.parse(s); | |
| 232 | + } catch (Exception e) { | |
| 233 | + return null; | |
| 234 | + } finally { | |
| 235 | + lock.unlock(); | |
| 236 | + } | |
| 237 | + } | |
| 238 | + | |
| 239 | + public static Date parseYMDEnd(String s) { | |
| 240 | + if (s == null) { | |
| 241 | + return null; | |
| 242 | + } | |
| 243 | + | |
| 244 | + try { | |
| 245 | + lock.lock(); | |
| 246 | + Date d = y_m_d.parse(s); | |
| 247 | + long resultMis = d.getTime() + (1000 * 60 * 60 * 24 - 1); | |
| 248 | + return new Date(resultMis); | |
| 249 | + } catch (Exception e) { | |
| 250 | + return null; | |
| 251 | + } finally { | |
| 252 | + lock.unlock(); | |
| 253 | + } | |
| 254 | + } | |
| 255 | + | |
| 256 | + public static Date parseMD(String s) { | |
| 257 | + if (s == null) { | |
| 258 | + return null; | |
| 259 | + } | |
| 260 | + try { | |
| 261 | + return md.parse(s); | |
| 262 | + } catch (Exception e) { | |
| 263 | + return null; | |
| 264 | + } | |
| 265 | + } | |
| 266 | + | |
| 267 | + public static Date parseD(String s) { | |
| 268 | + if (s == null) { | |
| 269 | + return null; | |
| 270 | + } | |
| 271 | + try { | |
| 272 | + return dd.parse(s); | |
| 273 | + } catch (Exception e) { | |
| 274 | + return null; | |
| 275 | + } | |
| 276 | + } | |
| 277 | + | |
| 278 | + public static String getyyyy_MM_dd(Date d) { | |
| 279 | + if (d == null) { | |
| 280 | + return null; | |
| 281 | + } | |
| 282 | + try { | |
| 283 | + return y_m_d.format(d); | |
| 284 | + } catch (Exception e) { | |
| 285 | + return null; | |
| 286 | + } | |
| 287 | + } | |
| 288 | + | |
| 289 | + public static String getMMdd(Date d) { | |
| 290 | + if (d == null) { | |
| 291 | + return null; | |
| 292 | + } | |
| 293 | + try { | |
| 294 | + return md.format(d); | |
| 295 | + } catch (Exception e) { | |
| 296 | + return null; | |
| 297 | + } | |
| 298 | + } | |
| 299 | + | |
| 300 | + public static String getMM_dd(Date d) { | |
| 301 | + if (d == null) { | |
| 302 | + return null; | |
| 303 | + } | |
| 304 | + try { | |
| 305 | + return m_d.format(d); | |
| 306 | + } catch (Exception e) { | |
| 307 | + return null; | |
| 308 | + } | |
| 309 | + } | |
| 310 | + | |
| 311 | + public static String getDD(Date d) { | |
| 312 | + if (d == null) { | |
| 313 | + return null; | |
| 314 | + } | |
| 315 | + try { | |
| 316 | + return dd.format(d); | |
| 317 | + } catch (Exception e) { | |
| 318 | + return null; | |
| 319 | + } | |
| 320 | + } | |
| 321 | + | |
| 322 | + public static Date parseYMDHMS(String s) { | |
| 323 | + if (s == null) { | |
| 324 | + return null; | |
| 325 | + } | |
| 326 | + try { | |
| 327 | + return y_m_d_h_m_s.parse(s); | |
| 328 | + } catch (Exception e) { | |
| 329 | + return null; | |
| 330 | + } | |
| 331 | + } | |
| 332 | + | |
| 333 | + public static Date parseYMDHM(String s) { | |
| 334 | + if (s == null) { | |
| 335 | + return null; | |
| 336 | + } | |
| 337 | + try { | |
| 338 | + return y_m_d_h_m1.parse(s); | |
| 339 | + } catch (Exception e) { | |
| 340 | + return null; | |
| 341 | + } | |
| 342 | + } | |
| 343 | + | |
| 344 | + public static String getyyyy_MM_dd_hms(Date d) { | |
| 345 | + if (d == null) { | |
| 346 | + return null; | |
| 347 | + } | |
| 348 | + try { | |
| 349 | + return y_m_d_h_m_s.format(d); | |
| 350 | + } catch (Exception e) { | |
| 351 | + return null; | |
| 352 | + } | |
| 353 | + } | |
| 354 | + | |
| 355 | + public static Date getDayStartTime(Date startTime) { | |
| 356 | + if (startTime == null) { | |
| 357 | + return null; | |
| 358 | + } | |
| 359 | + DateTime dt = new DateTime(startTime.getTime()); | |
| 360 | + dt = dt.minusMillis(dt.getMillisOfDay()); | |
| 361 | + return dt.toDate(); | |
| 362 | + } | |
| 363 | + | |
| 364 | + public static Date getDayEndTime(Date endTime) { | |
| 365 | + if (endTime == null) { | |
| 366 | + return null; | |
| 367 | + } | |
| 368 | + DateTime dt = new DateTime(endTime.getTime()); | |
| 369 | + dt = dt.minusMillis(dt.getMillisOfDay()).plusSeconds(DAY_SECONDS); | |
| 370 | + return dt.toDate(); | |
| 371 | + } | |
| 372 | + | |
| 373 | + public static Date getMonthStart(Date time) { | |
| 374 | + if (time == null) { | |
| 375 | + return null; | |
| 376 | + } | |
| 377 | + DateTime dt = new DateTime(time.getTime()); | |
| 378 | + dt = dt.minusMillis(dt.getMillisOfDay()).minusDays(dt.getDayOfMonth() - 1); | |
| 379 | + return dt.toDate(); | |
| 380 | + } | |
| 381 | + | |
| 382 | + public static Date getMonthEndTime(Date endTime) { | |
| 383 | + if (endTime == null) { | |
| 384 | + return null; | |
| 385 | + } | |
| 386 | + DateTime dt = new DateTime(getMonthStart(new DateTime(endTime.getTime()).plusMonths(1).toDate())).minusDays(1) | |
| 387 | + .plusSeconds(DAY_SECONDS); | |
| 388 | + return dt.toDate(); | |
| 389 | + } | |
| 390 | + | |
| 391 | + public static Date getQuarterStart(Date date) { | |
| 392 | + if (date == null) { | |
| 393 | + return null; | |
| 394 | + } | |
| 395 | + DateTime dt = new DateTime(date.getTime()).minusMonths(1); | |
| 396 | + dt = dt.withMonthOfYear(dt.getMonthOfYear() / 3 * 3 + 1); | |
| 397 | + return getMonthStart(dt.toDate()); | |
| 398 | + } | |
| 399 | + | |
| 400 | + public static Date getQuarterEnd(Date date) { | |
| 401 | + if (date == null) { | |
| 402 | + return null; | |
| 403 | + } | |
| 404 | + DateTime dt = new DateTime(date.getTime()).minusMonths(1); | |
| 405 | + dt = dt.withMonthOfYear(dt.getMonthOfYear() / 3 * 3 + 3); | |
| 406 | + return getMonthEndTime(dt.toDate()); | |
| 407 | + } | |
| 408 | + | |
| 409 | + public static Date getWeekStart(Date date) { | |
| 410 | + if (date == null) { | |
| 411 | + return null; | |
| 412 | + } | |
| 413 | + DateTime dt = new DateTime(date.getTime()); | |
| 414 | + dt = dt.withDayOfWeek(1); | |
| 415 | + return getDayStartTime(dt.toDate()); | |
| 416 | + } | |
| 417 | + | |
| 418 | + public static Date getWeekEnd(Date date) { | |
| 419 | + if (date == null) { | |
| 420 | + return null; | |
| 421 | + } | |
| 422 | + DateTime dt = new DateTime(date.getTime()); | |
| 423 | + dt = dt.withDayOfWeek(1).plusDays(6); | |
| 424 | + return getDayEndTime(dt.toDate()); | |
| 425 | + } | |
| 426 | + | |
| 427 | + public static Integer getWeekNum(Date date) { | |
| 428 | + if (date == null) { | |
| 429 | + return null; | |
| 430 | + } | |
| 431 | + DateTime dt = new DateTime(date.getTime()); | |
| 432 | + return (dt.getWeekyear() % 100) * 100 + dt.getWeekOfWeekyear(); | |
| 433 | + } | |
| 434 | + | |
| 435 | + public static Date addDay(Date srcDate, int days) { | |
| 436 | + Calendar rightNow = Calendar.getInstance(); | |
| 437 | + rightNow.setTime(srcDate); | |
| 438 | + rightNow.add(Calendar.DAY_OF_YEAR, days); | |
| 439 | + return rightNow.getTime(); | |
| 440 | + } | |
| 441 | + | |
| 442 | + public static Date addMonth(Date srcDate, int month) { | |
| 443 | + Calendar rightNow = Calendar.getInstance(); | |
| 444 | + rightNow.setTime(srcDate); | |
| 445 | + rightNow.add(Calendar.MONTH, month); | |
| 446 | + return rightNow.getTime(); | |
| 447 | + } | |
| 448 | + | |
| 449 | + public static Date addYear(Date srcDate, int year) { | |
| 450 | + Calendar rightNow = Calendar.getInstance(); | |
| 451 | + rightNow.setTime(srcDate); | |
| 452 | + rightNow.add(Calendar.YEAR, year); | |
| 453 | + return rightNow.getTime(); | |
| 454 | + } | |
| 455 | + | |
| 456 | + public static Date addWeek(Date srcDate, int weak) { | |
| 457 | + Calendar rightNow = Calendar.getInstance(); | |
| 458 | + rightNow.setTime(srcDate); | |
| 459 | + rightNow.add(Calendar.WEEK_OF_YEAR, weak); | |
| 460 | + return rightNow.getTime(); | |
| 461 | + } | |
| 462 | + | |
| 463 | + /** | |
| 464 | + * 获取当天还剩多少秒 | |
| 465 | + * | |
| 466 | + * @return | |
| 467 | + */ | |
| 468 | + public static int getDaySeconds() { | |
| 469 | + Calendar curDate = Calendar.getInstance(); | |
| 470 | + | |
| 471 | + Calendar tommorowDate = new GregorianCalendar(curDate.get(Calendar.YEAR), curDate.get(Calendar.MONTH), | |
| 472 | + curDate.get(Calendar.DATE) + 1, 0, 0, 0); | |
| 473 | + return (int) (tommorowDate.getTimeInMillis() - curDate.getTimeInMillis()) / 1000; | |
| 474 | + } | |
| 475 | + | |
| 476 | + /** | |
| 477 | + * 计算儿童的月龄 | |
| 478 | + * @param birth | |
| 479 | + * @param checkDate | |
| 480 | + * @return | |
| 481 | + */ | |
| 482 | + public static String getBabyMonthAge(Date birth, Date checkDate) { | |
| 483 | + Calendar rightNow = Calendar.getInstance(); | |
| 484 | + rightNow.setTime(checkDate); | |
| 485 | + rightNow.add(Calendar.MONTH, -1); | |
| 486 | + if (birth.getTime() > rightNow.getTime().getTime()) { | |
| 487 | + int day = daysBetween(birth, checkDate); | |
| 488 | + return day + "天"; | |
| 489 | + } | |
| 490 | + Calendar rightNow1 = Calendar.getInstance(); | |
| 491 | + rightNow1.setTime(checkDate); | |
| 492 | + rightNow1.add(Calendar.YEAR, -1); | |
| 493 | + | |
| 494 | + if (birth.getTime() > rightNow1.getTime().getTime()) { | |
| 495 | + | |
| 496 | + int month = getMonthSpace(birth, checkDate); | |
| 497 | + Calendar yearNow = Calendar.getInstance(); | |
| 498 | + yearNow.setTime(birth); | |
| 499 | + yearNow.add(Calendar.MONTH, month); | |
| 500 | + | |
| 501 | + int day = daysBetween(yearNow.getTime(), checkDate); | |
| 502 | + String dstr = ""; | |
| 503 | + if (day != 0) { | |
| 504 | + dstr = day + "天"; | |
| 505 | + } | |
| 506 | + String ms = ""; | |
| 507 | + if (month != 0) { | |
| 508 | + ms = month + "月龄"; | |
| 509 | + } | |
| 510 | + return ms + dstr; | |
| 511 | + } | |
| 512 | + int year = getYearSpace(birth, checkDate); | |
| 513 | + rightNow.setTime(checkDate); | |
| 514 | + rightNow.add(Calendar.YEAR, year); | |
| 515 | + | |
| 516 | + int month = getMonthSpace1(birth, rightNow.getTime()); | |
| 517 | + | |
| 518 | + return year + "岁" + (month == 0 ? "" : month + "月龄"); | |
| 519 | + } | |
| 520 | + | |
| 521 | + public static int daysBetween(Date smdate, Date bdate) { | |
| 522 | + if (smdate == null || bdate == null) { | |
| 523 | + return -1; | |
| 524 | + } | |
| 525 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 526 | + try { | |
| 527 | + smdate = sdf.parse(sdf.format(smdate)); | |
| 528 | + bdate = sdf.parse(sdf.format(bdate)); | |
| 529 | + Calendar cal = Calendar.getInstance(); | |
| 530 | + cal.setTime(smdate); | |
| 531 | + long time1 = cal.getTimeInMillis(); | |
| 532 | + cal.setTime(bdate); | |
| 533 | + long time2 = cal.getTimeInMillis(); | |
| 534 | + long between_days = (time2 - time1) / (1000 * 3600 * 24); | |
| 535 | + return Integer.parseInt(String.valueOf(between_days)); | |
| 536 | + } catch (ParseException e) { | |
| 537 | + e.printStackTrace(); | |
| 538 | + } | |
| 539 | + | |
| 540 | + return 0; | |
| 541 | + } | |
| 542 | + | |
| 543 | + public static int getMonthSpace(Date date1, Date date2) { | |
| 544 | + | |
| 545 | + int result = 0; | |
| 546 | + | |
| 547 | + Calendar c1 = Calendar.getInstance(); | |
| 548 | + Calendar c2 = Calendar.getInstance(); | |
| 549 | + | |
| 550 | + c1.setTime(date1); | |
| 551 | + c2.setTime(date2); | |
| 552 | + | |
| 553 | + result = c2.get(Calendar.MONDAY) - c1.get(Calendar.MONTH); | |
| 554 | + if (result <= 0) { | |
| 555 | + result = 12 - Math.abs(result); | |
| 556 | + } | |
| 557 | + | |
| 558 | + // result = result == 0 ? 1 : Math.abs(result); | |
| 559 | + if (Integer.parseInt(getDD(date1)) > Integer.parseInt(getDD(date2))) { | |
| 560 | + result = result - 1; | |
| 561 | + } | |
| 562 | + | |
| 563 | + return result; | |
| 564 | + | |
| 565 | + } | |
| 566 | + | |
| 567 | + public static int countMonths(Date date1, Date date2) throws ParseException { | |
| 568 | + | |
| 569 | + /* Calendar c1=Calendar.getInstance(); | |
| 570 | + Calendar c2=Calendar.getInstance(); | |
| 571 | + | |
| 572 | + c1.setTime(date1); | |
| 573 | + c2.setTime(date2); | |
| 574 | + | |
| 575 | + int year =c2.get(Calendar.YEAR)-c1.get(Calendar.YEAR); | |
| 576 | + System.out.print(year); | |
| 577 | + //开始日期若小月结束日期 | |
| 578 | + if(year<0){ | |
| 579 | + year=-year; | |
| 580 | + return year*12+c1.get(Calendar.MONTH)-c2.get(Calendar.MONTH); | |
| 581 | + }*/ | |
| 582 | + | |
| 583 | + // return year*12+c2.get(Calendar.MONTH)-c1.get(Calendar.MONTH); | |
| 584 | + return 0; | |
| 585 | + | |
| 586 | + } | |
| 587 | + | |
| 588 | + public static int getBabyMonthAge1(Date birth, Date checkDate) { | |
| 589 | + Calendar rightNow = Calendar.getInstance(); | |
| 590 | + rightNow.setTime(checkDate); | |
| 591 | + rightNow.add(Calendar.MONTH, -1); | |
| 592 | + if (birth.getTime() > rightNow.getTime().getTime()) { | |
| 593 | + return 0; | |
| 594 | + } | |
| 595 | + Calendar rightNow1 = Calendar.getInstance(); | |
| 596 | + rightNow1.setTime(checkDate); | |
| 597 | + rightNow1.add(Calendar.YEAR, -1); | |
| 598 | + | |
| 599 | + if (birth.getTime() > rightNow1.getTime().getTime()) { | |
| 600 | + | |
| 601 | + int month = getMonthSpace(birth, checkDate); | |
| 602 | + Calendar yearNow = Calendar.getInstance(); | |
| 603 | + yearNow.setTime(birth); | |
| 604 | + yearNow.add(Calendar.MONTH, month); | |
| 605 | + return month; | |
| 606 | + } | |
| 607 | + int year = getYearSpace(birth, checkDate); | |
| 608 | + rightNow.setTime(checkDate); | |
| 609 | + rightNow.add(Calendar.YEAR, year); | |
| 610 | + | |
| 611 | + int month = getMonthSpace1(birth, rightNow.getTime()); | |
| 612 | + | |
| 613 | + return year * 12 + month; | |
| 614 | + } | |
| 615 | + | |
| 616 | + public static int getMonthSpace1(Date date1, Date date2) { | |
| 617 | + | |
| 618 | + int result = 0; | |
| 619 | + | |
| 620 | + Calendar c1 = Calendar.getInstance(); | |
| 621 | + Calendar c2 = Calendar.getInstance(); | |
| 622 | + | |
| 623 | + c1.setTime(date1); | |
| 624 | + c2.setTime(date2); | |
| 625 | + | |
| 626 | + result = c2.get(Calendar.MONDAY) - c1.get(Calendar.MONTH); | |
| 627 | + if (result < 0) { | |
| 628 | + result = 12 - Math.abs(result); | |
| 629 | + } | |
| 630 | + | |
| 631 | + if (Integer.parseInt(getDD(date1)) > Integer.parseInt(getDD(date2))) { | |
| 632 | + result = result - 1; | |
| 633 | + } | |
| 634 | + | |
| 635 | + return result; | |
| 636 | + | |
| 637 | + } | |
| 638 | + | |
| 639 | + public static int getYearSpace(Date date1, Date date2) { | |
| 640 | + int result = 0; | |
| 641 | + | |
| 642 | + Calendar c1 = Calendar.getInstance(); | |
| 643 | + Calendar c2 = Calendar.getInstance(); | |
| 644 | + | |
| 645 | + c1.setTime(date1); | |
| 646 | + c2.setTime(date2); | |
| 647 | + | |
| 648 | + result = c2.get(Calendar.YEAR) - c1.get(Calendar.YEAR); | |
| 649 | + if (Integer.parseInt(getMMdd(date1).split("-")[0]) > Integer.parseInt(getMMdd(date2).split("-")[0])) { | |
| 650 | + result = result - 1; | |
| 651 | + } | |
| 652 | + return result == 0 ? 1 : Math.abs(result); | |
| 653 | + | |
| 654 | + } | |
| 655 | + | |
| 656 | + public static int getBabyAgeMonth(Date d1, Date d2) { | |
| 657 | + int months = 0;//相差月份 | |
| 658 | + int y1 = d1.getYear(); | |
| 659 | + int y2 = d2.getYear(); | |
| 660 | + int dd1 = d1.getDate(); //起始日期天 | |
| 661 | + int dd2 = d2.getDate(); //结束日期天 | |
| 662 | + if (d1.getTime() < d2.getTime()) { | |
| 663 | + months = d2.getMonth() - d1.getMonth() + (y2 - y1) * 12; | |
| 664 | + if (dd2 < dd1) { | |
| 665 | + months = months - 1; | |
| 666 | + } | |
| 667 | + } | |
| 668 | + return months; | |
| 669 | + } | |
| 670 | + | |
| 671 | + /** | |
| 672 | + * 获取当前日期是星期几<br> | |
| 673 | + * | |
| 674 | + * @param dt | |
| 675 | + * @return 当前日期是星期几 | |
| 676 | + */ | |
| 677 | + public static String getWeekOfDate(Date dt) { | |
| 678 | + String[] weekDays = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" }; | |
| 679 | + Calendar cal = Calendar.getInstance(); | |
| 680 | + cal.setTime(dt); | |
| 681 | + System.out.println(cal.get(Calendar.DAY_OF_WEEK)); | |
| 682 | + int w = cal.get(Calendar.DAY_OF_WEEK) - 1; | |
| 683 | + if (w < 0) | |
| 684 | + w = 0; | |
| 685 | + return weekDays[w]; | |
| 686 | + } | |
| 687 | + | |
| 688 | + public static Date getRangeDate(Date initDate, int num, String type, int delayDay) { | |
| 689 | + | |
| 690 | + Calendar rightNow = Calendar.getInstance(); | |
| 691 | + rightNow.setTime(initDate); | |
| 692 | + if (type == null) | |
| 693 | + return null; | |
| 694 | + if (type.equals("年".trim())) { | |
| 695 | + rightNow.add(Calendar.YEAR, num); | |
| 696 | + | |
| 697 | + } else if (type.equals("月".trim())) { | |
| 698 | + | |
| 699 | + rightNow.add(Calendar.MONTH, num); | |
| 700 | + } else if (type.equals("周".trim())) { | |
| 701 | + rightNow.add(Calendar.WEEK_OF_YEAR, num); | |
| 702 | + } else if (type.equals("天".trim())) { | |
| 703 | + rightNow.add(Calendar.DAY_OF_YEAR, num); | |
| 704 | + } | |
| 705 | + rightNow.add(Calendar.DAY_OF_YEAR, delayDay); | |
| 706 | + String date = y_m_d.format(rightNow.getTime()); | |
| 707 | + System.out.println(date); | |
| 708 | + return rightNow.getTime(); | |
| 709 | + } | |
| 710 | + | |
| 711 | + public static Date getNewDate(int num, String type, int day) { | |
| 712 | + Date dt = new Date(); | |
| 713 | + | |
| 714 | + Calendar rightNow = Calendar.getInstance(); | |
| 715 | + rightNow.setTime(dt); | |
| 716 | + if (type == null) | |
| 717 | + return null; | |
| 718 | + if (type.trim().equals("年")) { | |
| 719 | + rightNow.add(Calendar.YEAR, num); | |
| 720 | + } else if (type.trim().equals("月")) { | |
| 721 | + rightNow.add(Calendar.MONTH, num); | |
| 722 | + } else if (type.trim().equals("周")) { | |
| 723 | + rightNow.add(Calendar.WEEK_OF_YEAR, num); | |
| 724 | + } else if (type.trim().equals("天")) { | |
| 725 | + rightNow.add(Calendar.DAY_OF_YEAR, num); | |
| 726 | + } | |
| 727 | + rightNow.add(Calendar.DAY_OF_YEAR, day); | |
| 728 | + String date = y_m_d.format(rightNow.getTime()); | |
| 729 | + System.out.println(date); | |
| 730 | + return rightNow.getTime(); | |
| 731 | + } | |
| 732 | + | |
| 733 | + public static Date formatDate(Date date) { | |
| 734 | + String time = y_m_d.format(date); | |
| 735 | + return parseYMD(time); | |
| 736 | + } | |
| 737 | + | |
| 738 | + public static String formatSimpleDate(Date date) { | |
| 739 | + if (date == null) { | |
| 740 | + return ""; | |
| 741 | + } | |
| 742 | + SimpleDateFormat md = new SimpleDateFormat("M-d"); | |
| 743 | + return md.format(date); | |
| 744 | + } | |
| 745 | + | |
| 746 | + public static void main(String[] arg) { | |
| 747 | + System.out.println(getAge(parseYMD("1990-01-9"))); | |
| 748 | + } | |
| 749 | + | |
| 750 | + /** | |
| 751 | + * @auther HuJiaqi | |
| 752 | + * @createTime 2016年11月29日 11时30分 | |
| 753 | + * @discription 这个方法是为了孕产妇围产管理-统计管理-预产期统计管理定制,请慎重使用 | |
| 754 | + */ | |
| 755 | + public static String addMonthWithout0(String date, int add) { | |
| 756 | + int year = Integer.valueOf(date.substring(0, 4)); | |
| 757 | + int month = Integer.valueOf(date.substring(5)) + add; | |
| 758 | + if (month < 13) { | |
| 759 | + date = year + "-" + month; | |
| 760 | + } else { | |
| 761 | + date = (year + 1) + "-" + (month - 12); | |
| 762 | + } | |
| 763 | + return date; | |
| 764 | + } | |
| 765 | + | |
| 766 | + /** | |
| 767 | + * @auther HuJiaqi | |
| 768 | + * @createTime 2016年11月29日 11时30分 | |
| 769 | + * @discription 这个方法是为了孕产妇围产管理-统计管理-预产期统计管理定制,请慎重使用 | |
| 770 | + */ | |
| 771 | + public static String addMonthWith0(String date, int add) { | |
| 772 | + date = addMonthWithout0(date, add); | |
| 773 | + if (date.substring(5).length() == 1) { | |
| 774 | + date = date.substring(0, 4) + "-" + 0 + date.substring(5); | |
| 775 | + } | |
| 776 | + return date; | |
| 777 | + } | |
| 778 | + | |
| 779 | + /** | |
| 780 | + * @auther HuJiaqi | |
| 781 | + * @createTime 2016年12月13日 17时10分 | |
| 782 | + * @discription 格式化传入时间的方法,注意这里是获取的前面时间的00和后面时间的59,这个方法很苛刻,必须前后都传了值,而且是2016-12-15+-+2016-12-25格式 | |
| 783 | + */ | |
| 784 | + public static Date[] getSNDate(String snDateString) { | |
| 785 | + return new Date[] { parseYMD(snDateString.substring(0, 10)), parseYMDEnd(snDateString.substring(13, 23)) }; | |
| 786 | + } | |
| 787 | + | |
| 788 | +} |
parent/core.sdk/src/main/java/com/lyms/web/controller/BaseController.java
View file @
24d0e2c
parent/hospital.mac/src/main/java/com/lyms/hospital/dao/diagnose/DiagnoseInfoMapper.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.dao.diagnose; | |
| 2 | + | |
| 3 | +import com.lyms.hospital.entity.diagnose.DiagnoseInfo; | |
| 4 | +import com.baomidou.mybatisplus.mapper.BaseMapper; | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | +import java.io.Serializable; | |
| 7 | +/** | |
| 8 | + * <p> | |
| 9 | + * Mapper接口 | |
| 10 | + * </p> | |
| 11 | + * | |
| 12 | + * @author jiangjiazhi | |
| 13 | + * @since 2017-03-28 | |
| 14 | + */ | |
| 15 | +@Repository | |
| 16 | +public interface DiagnoseInfoMapper extends BaseMapper<DiagnoseInfo> { | |
| 17 | + | |
| 18 | + public Integer deleteLogicById(Serializable id); | |
| 19 | + | |
| 20 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/dao/diagnose/DiagnoseInfoMapper.xml
View file @
24d0e2c
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lyms.hospital.dao.diagnose.DiagnoseInfoMapper"> | |
| 4 | + | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.hospital.entity.diagnose.DiagnoseInfo"> | |
| 7 | + <id column="ID" property="id" /> | |
| 8 | + <result column="WOMAN_ID" property="womanId" /> | |
| 9 | + <result column="TYPE" property="type" /> | |
| 10 | + <result column="YUN_NUM" property="yunNum" /> | |
| 11 | + <result column="CHAN_NUM" property="chanNum" /> | |
| 12 | + <result column="SHUN_NUM" property="shunNum" /> | |
| 13 | + <result column="PAO_NUM" property="paoNum" /> | |
| 14 | + <result column="LIU_NUM" property="liuNum" /> | |
| 15 | + <result column="ZIRAN_NUM" property="ziranNum" /> | |
| 16 | + <result column="RENGONG_NUM" property="rengongNum" /> | |
| 17 | + <result column="SITAI_NUM" property="sitaiNum" /> | |
| 18 | + <result column="SICHAN_NUM" property="sichanNum" /> | |
| 19 | + <result column="CHILDDIE_NUM" property="childdieNum" /> | |
| 20 | + <result column="BIRTHDEFECT_NUM" property="birthdefectNum" /> | |
| 21 | + <result column="HEIGHT" property="height" /> | |
| 22 | + <result column="WEIGHT" property="weight" /> | |
| 23 | + <result column="HEIGHT_AGO" property="heightAgo" /> | |
| 24 | + <result column="WEIGHT_INDEX" property="weightIndex" /> | |
| 25 | + <result column="BLOOD_SHRINK" property="bloodShrink" /> | |
| 26 | + <result column="BLOOD_DIASTOLE" property="bloodDiastole" /> | |
| 27 | + <result column="HEART" property="heart" /> | |
| 28 | + <result column="LUNG" property="lung" /> | |
| 29 | + <result column="WAIYIN_WOMAN" property="waiyinWoman" /> | |
| 30 | + <result column="YINDAO_WOMAN" property="yindaoWoman" /> | |
| 31 | + <result column="GONGJING_WOMAN" property="gongjingWoman" /> | |
| 32 | + <result column="ZIGONG_WOMAN" property="zigongWoman" /> | |
| 33 | + <result column="FUJIAN_WOMAN" property="fujianWoman" /> | |
| 34 | + <result column="GONGGAO_OBSTETRICS" property="gonggaoObstetrics" /> | |
| 35 | + <result column="FUWEI_OBSTETRICS" property="fuweiObstetrics" /> | |
| 36 | + <result column="FUZHONG_OBSTETRICS" property="fuzhongObstetrics" /> | |
| 37 | + <result column="TAISHU_OBSTETRICS" property="taishuObstetrics" /> | |
| 38 | + <result column="DISPOSE_SUGGEST" property="disposeSuggest" /> | |
| 39 | + <result column="GUIDE_SUGGEST" property="guideSuggest" /> | |
| 40 | + <result column="NEXTINSPECT_NUM" property="nextinspectNum" /> | |
| 41 | + <result column="NEXTINSPECT_TIME" property="nextinspectTime" /> | |
| 42 | + <result column="DOCTOR_ID" property="doctorId" /> | |
| 43 | + <result column="ORG_ID" property="orgId" /> | |
| 44 | + <result column="DIAGNOSE_TIME" property="diagnoseTime" /> | |
| 45 | + </resultMap> | |
| 46 | + | |
| 47 | + <!-- 通用查询结果列 --> | |
| 48 | + <sql id="Base_Column_List"> | |
| 49 | + ID AS id, WOMAN_ID AS womanId, TYPE AS type, YUN_NUM AS yunNum, CHAN_NUM AS chanNum, SHUN_NUM AS shunNum, PAO_NUM AS paoNum, LIU_NUM AS liuNum, ZIRAN_NUM AS ziranNum, RENGONG_NUM AS rengongNum, SITAI_NUM AS sitaiNum, SICHAN_NUM AS sichanNum, CHILDDIE_NUM AS childdieNum, BIRTHDEFECT_NUM AS birthdefectNum, HEIGHT AS height, WEIGHT AS weight, HEIGHT_AGO AS heightAgo, WEIGHT_INDEX AS weightIndex, BLOOD_SHRINK AS bloodShrink, BLOOD_DIASTOLE AS bloodDiastole, HEART AS heart, LUNG AS lung, WAIYIN_WOMAN AS waiyinWoman, YINDAO_WOMAN AS yindaoWoman, GONGJING_WOMAN AS gongjingWoman, ZIGONG_WOMAN AS zigongWoman, FUJIAN_WOMAN AS fujianWoman, GONGGAO_OBSTETRICS AS gonggaoObstetrics, FUWEI_OBSTETRICS AS fuweiObstetrics, FUZHONG_OBSTETRICS AS fuzhongObstetrics, TAISHU_OBSTETRICS AS taishuObstetrics, DISPOSE_SUGGEST AS disposeSuggest, GUIDE_SUGGEST AS guideSuggest, NEXTINSPECT_NUM AS nextinspectNum, NEXTINSPECT_TIME AS nextinspectTime, DOCTOR_ID AS doctorId, ORG_ID AS orgId, DIAGNOSE_TIME AS diagnoseTime | |
| 50 | + </sql> | |
| 51 | +</mapper> |
parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/DiagnoseAssitMapper.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.dao.woman; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | + | |
| 7 | +import com.baomidou.mybatisplus.mapper.BaseMapper; | |
| 8 | +import com.lyms.hospital.entity.diagnose.DiagnoseAssit; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * Mapper接口 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author jiangjiazhi | |
| 16 | + * @since 2017-03-29 | |
| 17 | + */ | |
| 18 | +@Repository | |
| 19 | +public interface DiagnoseAssitMapper extends BaseMapper<DiagnoseAssit> { | |
| 20 | + | |
| 21 | + public Integer deleteLogicById(Serializable id); | |
| 22 | + | |
| 23 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/DiagnoseAssitMapper.xml
View file @
24d0e2c
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lyms.hospital.dao.woman.DiagnoseAssitMapper"> | |
| 4 | + | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.hospital.entity.woman.DiagnoseAssit"> | |
| 7 | + <id column="ID" property="id" /> | |
| 8 | + <result column="DIAGNOSE_ID" property="diagnoseId" /> | |
| 9 | + <result column="BLOODROUTINE_XHDB" property="bloodroutineXhdb" /> | |
| 10 | + <result column="BLOODROUTINE_BXBJS" property="bloodroutineBxbjs" /> | |
| 11 | + <result column="BLOODROUTINE_XXBJS" property="bloodroutineXxbjs" /> | |
| 12 | + <result column="BLOODROUTINE_OTHER" property="bloodroutineOther" /> | |
| 13 | + <result column="PISS_NDB" property="pissNdb" /> | |
| 14 | + <result column="PISS_NT" property="pissNt" /> | |
| 15 | + <result column="PISS_NTT" property="pissNtt" /> | |
| 16 | + <result column="PISS_NQX" property="pissNqx" /> | |
| 17 | + <result column="PISS_OTHER" property="pissOther" /> | |
| 18 | + <result column="BLOODTYPE" property="bloodtype" /> | |
| 19 | + <result column="BLOODTYPE_RH" property="bloodtypeRh" /> | |
| 20 | + <result column="BLOODTYPE_XT" property="bloodtypeXt" /> | |
| 21 | + <result column="LIVER_XQGBZAM" property="liverXqgbzam" /> | |
| 22 | + <result column="LIVER_XQGCZAM" property="liverXqgczam" /> | |
| 23 | + <result column="LIVER_BDB" property="liverBdb" /> | |
| 24 | + <result column="LIVER_ZDHS" property="liverZdhs" /> | |
| 25 | + <result column="LIVER_ZHDHS" property="liverZhdhs" /> | |
| 26 | + <result column="LIVER_BG" property="liverBg" /> | |
| 27 | + <result column="HEPATITISB_YGBMKY" property="hepatitisbYgbmky" /> | |
| 28 | + <result column="HEPATITISB_YGBMKT" property="hepatitisbYgbmkt" /> | |
| 29 | + <result column="HEPATITISB_YGEKY" property="hepatitisbYgeky" /> | |
| 30 | + <result column="HEPATITISB_YGEKT" property="hepatitisbYgekt" /> | |
| 31 | + <result column="HEPATITISB_YGHXKT" property="hepatitisbYghxkt" /> | |
| 32 | + <result column="KIDNEY_XQJG" property="kidneyXqjg" /> | |
| 33 | + <result column="KIDNEY_XNSD" property="kidneyXnsd" /> | |
| 34 | + <result column="SYPHILIS_SYJG" property="syphilisSyjg" /> | |
| 35 | + <result column="SYPHILIS_HIV" property="syphilisHiv" /> | |
| 36 | + <result column="VAGINA_DC" property="vaginaDc" /> | |
| 37 | + <result column="VAGINA_JSJMJ" property="vaginaJsjmj" /> | |
| 38 | + <result column="VAGINA_OTHER" property="vaginaOther" /> | |
| 39 | + <result column="VAGINA_OTHER_TXT" property="vaginaOtherTxt" /> | |
| 40 | + <result column="VAGINA_YDQJD" property="vaginaYdqjd" /> | |
| 41 | + <result column="GONORRHOEA" property="gonorrhoea" /> | |
| 42 | + <result column="IMAGE_BULTRASOUND" property="imageBultrasound" /> | |
| 43 | + <result column="IMAGE_XT" property="imageXt" /> | |
| 44 | + </resultMap> | |
| 45 | + | |
| 46 | + <!-- 通用查询结果列 --> | |
| 47 | + <sql id="Base_Column_List"> | |
| 48 | + ID AS id, DIAGNOSE_ID AS diagnoseId, BLOODROUTINE_XHDB AS bloodroutineXhdb, BLOODROUTINE_BXBJS AS bloodroutineBxbjs, BLOODROUTINE_XXBJS AS bloodroutineXxbjs, BLOODROUTINE_OTHER AS bloodroutineOther, PISS_NDB AS pissNdb, PISS_NT AS pissNt, PISS_NTT AS pissNtt, PISS_NQX AS pissNqx, PISS_OTHER AS pissOther, BLOODTYPE AS bloodtype, BLOODTYPE_RH AS bloodtypeRh, BLOODTYPE_XT AS bloodtypeXt, LIVER_XQGBZAM AS liverXqgbzam, LIVER_XQGCZAM AS liverXqgczam, LIVER_BDB AS liverBdb, LIVER_ZDHS AS liverZdhs, LIVER_ZHDHS AS liverZhdhs, LIVER_BG AS liverBg, HEPATITISB_YGBMKY AS hepatitisbYgbmky, HEPATITISB_YGBMKT AS hepatitisbYgbmkt, HEPATITISB_YGEKY AS hepatitisbYgeky, HEPATITISB_YGEKT AS hepatitisbYgekt, HEPATITISB_YGHXKT AS hepatitisbYghxkt, KIDNEY_XQJG AS kidneyXqjg, KIDNEY_XNSD AS kidneyXnsd, SYPHILIS_SYJG AS syphilisSyjg, SYPHILIS_HIV AS syphilisHiv, VAGINA_DC AS vaginaDc, VAGINA_JSJMJ AS vaginaJsjmj, VAGINA_OTHER AS vaginaOther, VAGINA_OTHER_TXT AS vaginaOtherTxt, VAGINA_YDQJD AS vaginaYdqjd, GONORRHOEA AS gonorrhoea, IMAGE_BULTRASOUND AS imageBultrasound, IMAGE_XT AS imageXt | |
| 49 | + </sql> | |
| 50 | +</mapper> |
parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/PatientCheckTicketMapper.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.dao.woman; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 6 | +import org.springframework.dao.DataAccessException; | |
| 7 | +import org.springframework.data.redis.connection.RedisConnection; | |
| 8 | +import org.springframework.data.redis.core.RedisCallback; | |
| 9 | +import org.springframework.data.redis.core.RedisTemplate; | |
| 10 | +import org.springframework.stereotype.Repository; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * 产检劵dal | |
| 14 | + * <p/> | |
| 15 | + * data access layer | |
| 16 | + * <p/> | |
| 17 | + * 示例代码 | |
| 18 | + * <pre> | |
| 19 | + * </pre> | |
| 20 | + * | |
| 21 | + * @author JiaZhi.Jiang | |
| 22 | + * @version PLATFORM V100R001 2017-3-31 | |
| 23 | + * @since PLATFORM V100R001C40B104 | |
| 24 | + */ | |
| 25 | +@Repository | |
| 26 | +public abstract class PatientCheckTicketMapper implements WomanCheckTicketMapper { | |
| 27 | + | |
| 28 | + @Autowired | |
| 29 | + private RedisTemplate<Serializable, Serializable> redisTemplate; | |
| 30 | + | |
| 31 | + /** | |
| 32 | + * 获取该区域内的产检劵号 | |
| 33 | + * | |
| 34 | + * <li>@param areaCode | |
| 35 | + * <li>@return | |
| 36 | + * <li>创建人:Administrator | |
| 37 | + * <li>创建时间:2017-3-31 | |
| 38 | + * <li>修改人: | |
| 39 | + * <li>修改时间: | |
| 40 | + */ | |
| 41 | + public Integer nextPatientTicketId(final String areaCode) { | |
| 42 | + | |
| 43 | + return redisTemplate.execute(new RedisCallback<Integer>() { | |
| 44 | + @Override | |
| 45 | + public Integer doInRedis(RedisConnection arg0) throws DataAccessException { | |
| 46 | + Serializable obj = redisTemplate.opsForValue().increment(areaCode.getBytes(), 1); | |
| 47 | + return (Integer) obj; | |
| 48 | + } | |
| 49 | + }); | |
| 50 | + } | |
| 51 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/WomanCheckTicketMapper.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.dao.woman; | |
| 2 | + | |
| 3 | +import com.lyms.hospital.entity.woman.WomanCheckTicket; | |
| 4 | +import com.baomidou.mybatisplus.mapper.BaseMapper; | |
| 5 | +import org.springframework.stereotype.Repository; | |
| 6 | +import java.io.Serializable; | |
| 7 | +/** | |
| 8 | + * <p> | |
| 9 | + * Mapper接口 | |
| 10 | + * </p> | |
| 11 | + * | |
| 12 | + * @author jiangjiazhi | |
| 13 | + * @since 2017-03-31 | |
| 14 | + */ | |
| 15 | +@Repository | |
| 16 | +public interface WomanCheckTicketMapper extends BaseMapper<WomanCheckTicket> { | |
| 17 | + | |
| 18 | + public Integer deleteLogicById(Serializable id); | |
| 19 | + | |
| 20 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/dao/woman/WomanCheckTicketMapper.xml
View file @
24d0e2c
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |
| 3 | +<mapper namespace="com.lyms.hospital.dao.woman.WomanCheckTicketMapper"> | |
| 4 | + | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.hospital.entity.woman.WomanCheckTicket"> | |
| 7 | + <id column="ID" property="id" /> | |
| 8 | + <result column="WOMAN_ID" property="womanId" /> | |
| 9 | + <result column="HOSPITAL_ID" property="hospitalId" /> | |
| 10 | + <result column="PID" property="pid" /> | |
| 11 | + <result column="CONSUME_HOSPITAL_ID" property="consumeHospitalId" /> | |
| 12 | + <result column="STATUS" property="status" /> | |
| 13 | + <result column="CREATE_TIME" property="createTime" /> | |
| 14 | + <result column="CONSUME_TIME" property="consumeTime" /> | |
| 15 | + </resultMap> | |
| 16 | + | |
| 17 | + <!-- 通用查询结果列 --> | |
| 18 | + <sql id="Base_Column_List"> | |
| 19 | + ID AS id, WOMAN_ID AS womanId, HOSPITAL_ID AS hospitalId, PID AS pid, CONSUME_HOSPITAL_ID AS consumeHospitalId, STATUS AS status, CREATE_TIME AS createTime, CONSUME_TIME AS consumeTime | |
| 20 | + </sql> | |
| 21 | +</mapper> |
parent/hospital.mac/src/main/java/com/lyms/hospital/entity/diagnose/DiagnoseAssit.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.entity.diagnose; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.baomidou.mybatisplus.annotations.TableField; | |
| 6 | +import com.baomidou.mybatisplus.annotations.TableId; | |
| 7 | +import com.baomidou.mybatisplus.annotations.TableName; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * <p> | |
| 11 | + * 辅助检查项 | |
| 12 | + * </p> | |
| 13 | + * | |
| 14 | + * @author jiangjiazhi | |
| 15 | + * @since 2017-03-29 | |
| 16 | + */ | |
| 17 | +@TableName("DIAGNOSE_ASSIT") | |
| 18 | +public class DiagnoseAssit implements Serializable { | |
| 19 | + | |
| 20 | + private static final long serialVersionUID = 1L; | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * | |
| 24 | + */ | |
| 25 | + @TableId(value = "ID") | |
| 26 | + private String id; | |
| 27 | + /** | |
| 28 | + * 诊断ID,或婚前检查ID | |
| 29 | + */ | |
| 30 | + @TableField(value = "DIAGNOSE_ID") | |
| 31 | + private String diagnoseId; | |
| 32 | + /** | |
| 33 | + * 血红蛋白 | |
| 34 | + */ | |
| 35 | + @TableField(value = "BLOODROUTINE_XHDB") | |
| 36 | + private Integer bloodroutineXhdb; | |
| 37 | + /** | |
| 38 | + * 白细胞计数 | |
| 39 | + */ | |
| 40 | + @TableField(value = "BLOODROUTINE_BXBJS") | |
| 41 | + private Integer bloodroutineBxbjs; | |
| 42 | + /** | |
| 43 | + * 血小板计数 | |
| 44 | + */ | |
| 45 | + @TableField(value = "BLOODROUTINE_XXBJS") | |
| 46 | + private Integer bloodroutineXxbjs; | |
| 47 | + /** | |
| 48 | + * 其他 | |
| 49 | + */ | |
| 50 | + @TableField(value = "BLOODROUTINE_OTHER") | |
| 51 | + private String bloodroutineOther; | |
| 52 | + /** | |
| 53 | + * 尿蛋白 | |
| 54 | + */ | |
| 55 | + @TableField(value = "PISS_NDB") | |
| 56 | + private String pissNdb; | |
| 57 | + /** | |
| 58 | + * 尿糖 | |
| 59 | + */ | |
| 60 | + @TableField(value = "PISS_NT") | |
| 61 | + private String pissNt; | |
| 62 | + /** | |
| 63 | + * 尿酮体 | |
| 64 | + */ | |
| 65 | + @TableField(value = "PISS_NTT") | |
| 66 | + private String pissNtt; | |
| 67 | + /** | |
| 68 | + * 尿潜血 | |
| 69 | + */ | |
| 70 | + @TableField(value = "PISS_NQX") | |
| 71 | + private String pissNqx; | |
| 72 | + /** | |
| 73 | + * 其他 | |
| 74 | + */ | |
| 75 | + @TableField(value = "PISS_OTHER") | |
| 76 | + private String pissOther; | |
| 77 | + /** | |
| 78 | + * 血型 | |
| 79 | + */ | |
| 80 | + @TableField(value = "BLOODTYPE") | |
| 81 | + private String bloodtype; | |
| 82 | + /** | |
| 83 | + * RH血型 | |
| 84 | + */ | |
| 85 | + @TableField(value = "BLOODTYPE_RH") | |
| 86 | + private Integer bloodtypeRh; | |
| 87 | + /** | |
| 88 | + * 血糖 | |
| 89 | + */ | |
| 90 | + @TableField(value = "BLOODTYPE_XT") | |
| 91 | + private String bloodtypeXt; | |
| 92 | + /** | |
| 93 | + * 血清谷丙转氨酶 | |
| 94 | + */ | |
| 95 | + @TableField(value = "LIVER_XQGBZAM") | |
| 96 | + private Integer liverXqgbzam; | |
| 97 | + /** | |
| 98 | + * 血清谷草转氨酶 | |
| 99 | + */ | |
| 100 | + @TableField(value = "LIVER_XQGCZAM") | |
| 101 | + private Integer liverXqgczam; | |
| 102 | + /** | |
| 103 | + * 白蛋白 | |
| 104 | + */ | |
| 105 | + @TableField(value = "LIVER_BDB") | |
| 106 | + private Integer liverBdb; | |
| 107 | + /** | |
| 108 | + * 总胆红素 | |
| 109 | + */ | |
| 110 | + @TableField(value = "LIVER_ZDHS") | |
| 111 | + private Integer liverZdhs; | |
| 112 | + /** | |
| 113 | + * 综合胆红素 | |
| 114 | + */ | |
| 115 | + @TableField(value = "LIVER_ZHDHS") | |
| 116 | + private Integer liverZhdhs; | |
| 117 | + /** | |
| 118 | + * 丙肝 | |
| 119 | + */ | |
| 120 | + @TableField(value = "LIVER_BG") | |
| 121 | + private Integer liverBg; | |
| 122 | + /** | |
| 123 | + * 乙肝表面抗原 | |
| 124 | + */ | |
| 125 | + @TableField(value = "HEPATITISB_YGBMKY") | |
| 126 | + private Integer hepatitisbYgbmky; | |
| 127 | + /** | |
| 128 | + * 乙肝表面抗体 | |
| 129 | + */ | |
| 130 | + @TableField(value = "HEPATITISB_YGBMKT") | |
| 131 | + private Integer hepatitisbYgbmkt; | |
| 132 | + /** | |
| 133 | + * 乙肝E抗原 | |
| 134 | + */ | |
| 135 | + @TableField(value = "HEPATITISB_YGEKY") | |
| 136 | + private Integer hepatitisbYgeky; | |
| 137 | + /** | |
| 138 | + * 乙肝E抗体 | |
| 139 | + */ | |
| 140 | + @TableField(value = "HEPATITISB_YGEKT") | |
| 141 | + private Integer hepatitisbYgekt; | |
| 142 | + /** | |
| 143 | + * 乙肝核心抗体 | |
| 144 | + */ | |
| 145 | + @TableField(value = "HEPATITISB_YGHXKT") | |
| 146 | + private Integer hepatitisbYghxkt; | |
| 147 | + /** | |
| 148 | + * 血清肌酐 | |
| 149 | + */ | |
| 150 | + @TableField(value = "KIDNEY_XQJG") | |
| 151 | + private Integer kidneyXqjg; | |
| 152 | + /** | |
| 153 | + * 血尿素氮 | |
| 154 | + */ | |
| 155 | + @TableField(value = "KIDNEY_XNSD") | |
| 156 | + private Integer kidneyXnsd; | |
| 157 | + /** | |
| 158 | + * 梅毒血清实验-实验结果 | |
| 159 | + */ | |
| 160 | + @TableField(value = "SYPHILIS_SYJG") | |
| 161 | + private Integer syphilisSyjg; | |
| 162 | + /** | |
| 163 | + * HIV抗体检测 | |
| 164 | + */ | |
| 165 | + @TableField(value = "SYPHILIS_HIV") | |
| 166 | + private Integer syphilisHiv; | |
| 167 | + /** | |
| 168 | + * 阴道分泌物-滴虫 | |
| 169 | + */ | |
| 170 | + @TableField(value = "VAGINA_DC") | |
| 171 | + private Integer vaginaDc; | |
| 172 | + /** | |
| 173 | + * 假丝酵母菌 | |
| 174 | + */ | |
| 175 | + @TableField(value = "VAGINA_JSJMJ") | |
| 176 | + private Integer vaginaJsjmj; | |
| 177 | + /** | |
| 178 | + * 其他 | |
| 179 | + */ | |
| 180 | + @TableField(value = "VAGINA_OTHER") | |
| 181 | + private Integer vaginaOther; | |
| 182 | + /** | |
| 183 | + * 其他文本 | |
| 184 | + */ | |
| 185 | + @TableField(value = "VAGINA_OTHER_TXT") | |
| 186 | + private String vaginaOtherTxt; | |
| 187 | + /** | |
| 188 | + * 阴道清洁度 | |
| 189 | + */ | |
| 190 | + @TableField(value = "VAGINA_YDQJD") | |
| 191 | + private Integer vaginaYdqjd; | |
| 192 | + /** | |
| 193 | + * 淋病 | |
| 194 | + */ | |
| 195 | + @TableField(value = "GONORRHOEA") | |
| 196 | + private String gonorrhoea; | |
| 197 | + /** | |
| 198 | + * B超描述 | |
| 199 | + */ | |
| 200 | + @TableField(value = "IMAGE_BULTRASOUND") | |
| 201 | + private String imageBultrasound; | |
| 202 | + /** | |
| 203 | + * 胸透描述 | |
| 204 | + */ | |
| 205 | + @TableField(value = "IMAGE_XT") | |
| 206 | + private String imageXt; | |
| 207 | + | |
| 208 | + public String getId() { | |
| 209 | + return id; | |
| 210 | + } | |
| 211 | + | |
| 212 | + public void setId(String id) { | |
| 213 | + this.id = id; | |
| 214 | + } | |
| 215 | + | |
| 216 | + public String getDiagnoseId() { | |
| 217 | + return diagnoseId; | |
| 218 | + } | |
| 219 | + | |
| 220 | + public void setDiagnoseId(String diagnoseId) { | |
| 221 | + this.diagnoseId = diagnoseId; | |
| 222 | + } | |
| 223 | + | |
| 224 | + public Integer getBloodroutineXhdb() { | |
| 225 | + return bloodroutineXhdb; | |
| 226 | + } | |
| 227 | + | |
| 228 | + public void setBloodroutineXhdb(Integer bloodroutineXhdb) { | |
| 229 | + this.bloodroutineXhdb = bloodroutineXhdb; | |
| 230 | + } | |
| 231 | + | |
| 232 | + public Integer getBloodroutineBxbjs() { | |
| 233 | + return bloodroutineBxbjs; | |
| 234 | + } | |
| 235 | + | |
| 236 | + public void setBloodroutineBxbjs(Integer bloodroutineBxbjs) { | |
| 237 | + this.bloodroutineBxbjs = bloodroutineBxbjs; | |
| 238 | + } | |
| 239 | + | |
| 240 | + public Integer getBloodroutineXxbjs() { | |
| 241 | + return bloodroutineXxbjs; | |
| 242 | + } | |
| 243 | + | |
| 244 | + public void setBloodroutineXxbjs(Integer bloodroutineXxbjs) { | |
| 245 | + this.bloodroutineXxbjs = bloodroutineXxbjs; | |
| 246 | + } | |
| 247 | + | |
| 248 | + public String getBloodroutineOther() { | |
| 249 | + return bloodroutineOther; | |
| 250 | + } | |
| 251 | + | |
| 252 | + public void setBloodroutineOther(String bloodroutineOther) { | |
| 253 | + this.bloodroutineOther = bloodroutineOther; | |
| 254 | + } | |
| 255 | + | |
| 256 | + public String getPissNdb() { | |
| 257 | + return pissNdb; | |
| 258 | + } | |
| 259 | + | |
| 260 | + public void setPissNdb(String pissNdb) { | |
| 261 | + this.pissNdb = pissNdb; | |
| 262 | + } | |
| 263 | + | |
| 264 | + public String getPissNt() { | |
| 265 | + return pissNt; | |
| 266 | + } | |
| 267 | + | |
| 268 | + public void setPissNt(String pissNt) { | |
| 269 | + this.pissNt = pissNt; | |
| 270 | + } | |
| 271 | + | |
| 272 | + public String getPissNtt() { | |
| 273 | + return pissNtt; | |
| 274 | + } | |
| 275 | + | |
| 276 | + public void setPissNtt(String pissNtt) { | |
| 277 | + this.pissNtt = pissNtt; | |
| 278 | + } | |
| 279 | + | |
| 280 | + public String getPissNqx() { | |
| 281 | + return pissNqx; | |
| 282 | + } | |
| 283 | + | |
| 284 | + public void setPissNqx(String pissNqx) { | |
| 285 | + this.pissNqx = pissNqx; | |
| 286 | + } | |
| 287 | + | |
| 288 | + public String getPissOther() { | |
| 289 | + return pissOther; | |
| 290 | + } | |
| 291 | + | |
| 292 | + public void setPissOther(String pissOther) { | |
| 293 | + this.pissOther = pissOther; | |
| 294 | + } | |
| 295 | + | |
| 296 | + public String getBloodtype() { | |
| 297 | + return bloodtype; | |
| 298 | + } | |
| 299 | + | |
| 300 | + public void setBloodtype(String bloodtype) { | |
| 301 | + this.bloodtype = bloodtype; | |
| 302 | + } | |
| 303 | + | |
| 304 | + public Integer getBloodtypeRh() { | |
| 305 | + return bloodtypeRh; | |
| 306 | + } | |
| 307 | + | |
| 308 | + public void setBloodtypeRh(Integer bloodtypeRh) { | |
| 309 | + this.bloodtypeRh = bloodtypeRh; | |
| 310 | + } | |
| 311 | + | |
| 312 | + public String getBloodtypeXt() { | |
| 313 | + return bloodtypeXt; | |
| 314 | + } | |
| 315 | + | |
| 316 | + public void setBloodtypeXt(String bloodtypeXt) { | |
| 317 | + this.bloodtypeXt = bloodtypeXt; | |
| 318 | + } | |
| 319 | + | |
| 320 | + public Integer getLiverXqgbzam() { | |
| 321 | + return liverXqgbzam; | |
| 322 | + } | |
| 323 | + | |
| 324 | + public void setLiverXqgbzam(Integer liverXqgbzam) { | |
| 325 | + this.liverXqgbzam = liverXqgbzam; | |
| 326 | + } | |
| 327 | + | |
| 328 | + public Integer getLiverXqgczam() { | |
| 329 | + return liverXqgczam; | |
| 330 | + } | |
| 331 | + | |
| 332 | + public void setLiverXqgczam(Integer liverXqgczam) { | |
| 333 | + this.liverXqgczam = liverXqgczam; | |
| 334 | + } | |
| 335 | + | |
| 336 | + public Integer getLiverBdb() { | |
| 337 | + return liverBdb; | |
| 338 | + } | |
| 339 | + | |
| 340 | + public void setLiverBdb(Integer liverBdb) { | |
| 341 | + this.liverBdb = liverBdb; | |
| 342 | + } | |
| 343 | + | |
| 344 | + public Integer getLiverZdhs() { | |
| 345 | + return liverZdhs; | |
| 346 | + } | |
| 347 | + | |
| 348 | + public void setLiverZdhs(Integer liverZdhs) { | |
| 349 | + this.liverZdhs = liverZdhs; | |
| 350 | + } | |
| 351 | + | |
| 352 | + public Integer getLiverZhdhs() { | |
| 353 | + return liverZhdhs; | |
| 354 | + } | |
| 355 | + | |
| 356 | + public void setLiverZhdhs(Integer liverZhdhs) { | |
| 357 | + this.liverZhdhs = liverZhdhs; | |
| 358 | + } | |
| 359 | + | |
| 360 | + public Integer getLiverBg() { | |
| 361 | + return liverBg; | |
| 362 | + } | |
| 363 | + | |
| 364 | + public void setLiverBg(Integer liverBg) { | |
| 365 | + this.liverBg = liverBg; | |
| 366 | + } | |
| 367 | + | |
| 368 | + public Integer getHepatitisbYgbmky() { | |
| 369 | + return hepatitisbYgbmky; | |
| 370 | + } | |
| 371 | + | |
| 372 | + public void setHepatitisbYgbmky(Integer hepatitisbYgbmky) { | |
| 373 | + this.hepatitisbYgbmky = hepatitisbYgbmky; | |
| 374 | + } | |
| 375 | + | |
| 376 | + public Integer getHepatitisbYgbmkt() { | |
| 377 | + return hepatitisbYgbmkt; | |
| 378 | + } | |
| 379 | + | |
| 380 | + public void setHepatitisbYgbmkt(Integer hepatitisbYgbmkt) { | |
| 381 | + this.hepatitisbYgbmkt = hepatitisbYgbmkt; | |
| 382 | + } | |
| 383 | + | |
| 384 | + public Integer getHepatitisbYgeky() { | |
| 385 | + return hepatitisbYgeky; | |
| 386 | + } | |
| 387 | + | |
| 388 | + public void setHepatitisbYgeky(Integer hepatitisbYgeky) { | |
| 389 | + this.hepatitisbYgeky = hepatitisbYgeky; | |
| 390 | + } | |
| 391 | + | |
| 392 | + public Integer getHepatitisbYgekt() { | |
| 393 | + return hepatitisbYgekt; | |
| 394 | + } | |
| 395 | + | |
| 396 | + public void setHepatitisbYgekt(Integer hepatitisbYgekt) { | |
| 397 | + this.hepatitisbYgekt = hepatitisbYgekt; | |
| 398 | + } | |
| 399 | + | |
| 400 | + public Integer getHepatitisbYghxkt() { | |
| 401 | + return hepatitisbYghxkt; | |
| 402 | + } | |
| 403 | + | |
| 404 | + public void setHepatitisbYghxkt(Integer hepatitisbYghxkt) { | |
| 405 | + this.hepatitisbYghxkt = hepatitisbYghxkt; | |
| 406 | + } | |
| 407 | + | |
| 408 | + public Integer getKidneyXqjg() { | |
| 409 | + return kidneyXqjg; | |
| 410 | + } | |
| 411 | + | |
| 412 | + public void setKidneyXqjg(Integer kidneyXqjg) { | |
| 413 | + this.kidneyXqjg = kidneyXqjg; | |
| 414 | + } | |
| 415 | + | |
| 416 | + public Integer getKidneyXnsd() { | |
| 417 | + return kidneyXnsd; | |
| 418 | + } | |
| 419 | + | |
| 420 | + public void setKidneyXnsd(Integer kidneyXnsd) { | |
| 421 | + this.kidneyXnsd = kidneyXnsd; | |
| 422 | + } | |
| 423 | + | |
| 424 | + public Integer getSyphilisSyjg() { | |
| 425 | + return syphilisSyjg; | |
| 426 | + } | |
| 427 | + | |
| 428 | + public void setSyphilisSyjg(Integer syphilisSyjg) { | |
| 429 | + this.syphilisSyjg = syphilisSyjg; | |
| 430 | + } | |
| 431 | + | |
| 432 | + public Integer getSyphilisHiv() { | |
| 433 | + return syphilisHiv; | |
| 434 | + } | |
| 435 | + | |
| 436 | + public void setSyphilisHiv(Integer syphilisHiv) { | |
| 437 | + this.syphilisHiv = syphilisHiv; | |
| 438 | + } | |
| 439 | + | |
| 440 | + public Integer getVaginaDc() { | |
| 441 | + return vaginaDc; | |
| 442 | + } | |
| 443 | + | |
| 444 | + public void setVaginaDc(Integer vaginaDc) { | |
| 445 | + this.vaginaDc = vaginaDc; | |
| 446 | + } | |
| 447 | + | |
| 448 | + public Integer getVaginaJsjmj() { | |
| 449 | + return vaginaJsjmj; | |
| 450 | + } | |
| 451 | + | |
| 452 | + public void setVaginaJsjmj(Integer vaginaJsjmj) { | |
| 453 | + this.vaginaJsjmj = vaginaJsjmj; | |
| 454 | + } | |
| 455 | + | |
| 456 | + public Integer getVaginaOther() { | |
| 457 | + return vaginaOther; | |
| 458 | + } | |
| 459 | + | |
| 460 | + public void setVaginaOther(Integer vaginaOther) { | |
| 461 | + this.vaginaOther = vaginaOther; | |
| 462 | + } | |
| 463 | + | |
| 464 | + public String getVaginaOtherTxt() { | |
| 465 | + return vaginaOtherTxt; | |
| 466 | + } | |
| 467 | + | |
| 468 | + public void setVaginaOtherTxt(String vaginaOtherTxt) { | |
| 469 | + this.vaginaOtherTxt = vaginaOtherTxt; | |
| 470 | + } | |
| 471 | + | |
| 472 | + public Integer getVaginaYdqjd() { | |
| 473 | + return vaginaYdqjd; | |
| 474 | + } | |
| 475 | + | |
| 476 | + public void setVaginaYdqjd(Integer vaginaYdqjd) { | |
| 477 | + this.vaginaYdqjd = vaginaYdqjd; | |
| 478 | + } | |
| 479 | + | |
| 480 | + public String getGonorrhoea() { | |
| 481 | + return gonorrhoea; | |
| 482 | + } | |
| 483 | + | |
| 484 | + public void setGonorrhoea(String gonorrhoea) { | |
| 485 | + this.gonorrhoea = gonorrhoea; | |
| 486 | + } | |
| 487 | + | |
| 488 | + public String getImageBultrasound() { | |
| 489 | + return imageBultrasound; | |
| 490 | + } | |
| 491 | + | |
| 492 | + public void setImageBultrasound(String imageBultrasound) { | |
| 493 | + this.imageBultrasound = imageBultrasound; | |
| 494 | + } | |
| 495 | + | |
| 496 | + public String getImageXt() { | |
| 497 | + return imageXt; | |
| 498 | + } | |
| 499 | + | |
| 500 | + public void setImageXt(String imageXt) { | |
| 501 | + this.imageXt = imageXt; | |
| 502 | + } | |
| 503 | + | |
| 504 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/entity/diagnose/DiagnoseInfo.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.entity.diagnose; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | +import java.util.Date; | |
| 5 | + | |
| 6 | +import com.baomidou.mybatisplus.annotations.TableField; | |
| 7 | +import com.baomidou.mybatisplus.annotations.TableId; | |
| 8 | +import com.baomidou.mybatisplus.annotations.TableName; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 诊断信息表,包含初诊、复诊信息 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author jiangjiazhi | |
| 16 | + * @since 2017-03-31 | |
| 17 | + */ | |
| 18 | +@TableName("DIAGNOSE_INFO") | |
| 19 | +public class DiagnoseInfo implements Serializable { | |
| 20 | + | |
| 21 | + private static final long serialVersionUID = 1L; | |
| 22 | + | |
| 23 | + /** | |
| 24 | + * | |
| 25 | + */ | |
| 26 | + @TableId(value = "ID") | |
| 27 | + private String id; | |
| 28 | + /** | |
| 29 | + * | |
| 30 | + */ | |
| 31 | + @TableField(value = "WOMAN_ID") | |
| 32 | + private String womanId; | |
| 33 | + /** | |
| 34 | + * 诊断类型,0为初诊,1为复诊 | |
| 35 | + */ | |
| 36 | + @TableField(value = "TYPE") | |
| 37 | + private Integer type; | |
| 38 | + /** | |
| 39 | + * 孕次 | |
| 40 | + */ | |
| 41 | + @TableField(value = "YUN_NUM") | |
| 42 | + private Integer yunNum; | |
| 43 | + /** | |
| 44 | + * 产次 | |
| 45 | + */ | |
| 46 | + @TableField(value = "CHAN_NUM") | |
| 47 | + private Integer chanNum; | |
| 48 | + /** | |
| 49 | + * 顺产 | |
| 50 | + */ | |
| 51 | + @TableField(value = "SHUN_NUM") | |
| 52 | + private Integer shunNum; | |
| 53 | + /** | |
| 54 | + * 刨宫产 | |
| 55 | + */ | |
| 56 | + @TableField(value = "PAO_NUM") | |
| 57 | + private Integer paoNum; | |
| 58 | + /** | |
| 59 | + * 流产 | |
| 60 | + */ | |
| 61 | + @TableField(value = "LIU_NUM") | |
| 62 | + private Integer liuNum; | |
| 63 | + /** | |
| 64 | + * 自然 | |
| 65 | + */ | |
| 66 | + @TableField(value = "ZIRAN_NUM") | |
| 67 | + private Integer ziranNum; | |
| 68 | + /** | |
| 69 | + * 人工 | |
| 70 | + */ | |
| 71 | + @TableField(value = "RENGONG_NUM") | |
| 72 | + private Integer rengongNum; | |
| 73 | + /** | |
| 74 | + * 死胎 | |
| 75 | + */ | |
| 76 | + @TableField(value = "SITAI_NUM") | |
| 77 | + private Integer sitaiNum; | |
| 78 | + /** | |
| 79 | + * 死产 | |
| 80 | + */ | |
| 81 | + @TableField(value = "SICHAN_NUM") | |
| 82 | + private Integer sichanNum; | |
| 83 | + /** | |
| 84 | + * 新生儿死亡 | |
| 85 | + */ | |
| 86 | + @TableField(value = "CHILDDIE_NUM") | |
| 87 | + private Integer childdieNum; | |
| 88 | + /** | |
| 89 | + * 出生缺陷儿 | |
| 90 | + */ | |
| 91 | + @TableField(value = "BIRTHDEFECT_NUM") | |
| 92 | + private Integer birthdefectNum; | |
| 93 | + /** | |
| 94 | + * 身高 | |
| 95 | + */ | |
| 96 | + @TableField(value = "HEIGHT") | |
| 97 | + private Integer height; | |
| 98 | + /** | |
| 99 | + * 体重 | |
| 100 | + */ | |
| 101 | + @TableField(value = "WEIGHT") | |
| 102 | + private Integer weight; | |
| 103 | + /** | |
| 104 | + * 孕前体重 | |
| 105 | + */ | |
| 106 | + @TableField(value = "HEIGHT_AGO") | |
| 107 | + private Integer heightAgo; | |
| 108 | + /** | |
| 109 | + * 体重指数 | |
| 110 | + */ | |
| 111 | + @TableField(value = "WEIGHT_INDEX") | |
| 112 | + private Double weightIndex; | |
| 113 | + /** | |
| 114 | + * 血压_收缩压 | |
| 115 | + */ | |
| 116 | + @TableField(value = "BLOOD_SHRINK") | |
| 117 | + private Integer bloodShrink; | |
| 118 | + /** | |
| 119 | + * 血压_舒张压 | |
| 120 | + */ | |
| 121 | + @TableField(value = "BLOOD_DIASTOLE") | |
| 122 | + private Integer bloodDiastole; | |
| 123 | + /** | |
| 124 | + * 心脏 | |
| 125 | + */ | |
| 126 | + @TableField(value = "HEART") | |
| 127 | + private String heart; | |
| 128 | + /** | |
| 129 | + * 肺部 | |
| 130 | + */ | |
| 131 | + @TableField(value = "LUNG") | |
| 132 | + private String lung; | |
| 133 | + /** | |
| 134 | + * 外阴 | |
| 135 | + */ | |
| 136 | + @TableField(value = "WAIYIN_WOMAN") | |
| 137 | + private String waiyinWoman; | |
| 138 | + /** | |
| 139 | + * 阴道 | |
| 140 | + */ | |
| 141 | + @TableField(value = "YINDAO_WOMAN") | |
| 142 | + private String yindaoWoman; | |
| 143 | + /** | |
| 144 | + * | |
| 145 | + */ | |
| 146 | + @TableField(value = "GONGJING_WOMAN") | |
| 147 | + private String gongjingWoman; | |
| 148 | + /** | |
| 149 | + * 子宫 | |
| 150 | + */ | |
| 151 | + @TableField(value = "ZIGONG_WOMAN") | |
| 152 | + private String zigongWoman; | |
| 153 | + /** | |
| 154 | + * 附件 | |
| 155 | + */ | |
| 156 | + @TableField(value = "FUJIAN_WOMAN") | |
| 157 | + private String fujianWoman; | |
| 158 | + /** | |
| 159 | + * 宫高 | |
| 160 | + */ | |
| 161 | + @TableField(value = "GONGGAO_OBSTETRICS") | |
| 162 | + private Integer gonggaoObstetrics; | |
| 163 | + /** | |
| 164 | + * 腹围 | |
| 165 | + */ | |
| 166 | + @TableField(value = "FUWEI_OBSTETRICS") | |
| 167 | + private Integer fuweiObstetrics; | |
| 168 | + /** | |
| 169 | + * 浮肿 | |
| 170 | + */ | |
| 171 | + @TableField(value = "FUZHONG_OBSTETRICS") | |
| 172 | + private Integer fuzhongObstetrics; | |
| 173 | + /** | |
| 174 | + * 胎数 | |
| 175 | + */ | |
| 176 | + @TableField(value = "TAISHU_OBSTETRICS") | |
| 177 | + private Integer taishuObstetrics; | |
| 178 | + /** | |
| 179 | + * 处理意见 | |
| 180 | + */ | |
| 181 | + @TableField(value = "DISPOSE_SUGGEST") | |
| 182 | + private String disposeSuggest; | |
| 183 | + /** | |
| 184 | + * 指导意见 | |
| 185 | + */ | |
| 186 | + @TableField(value = "GUIDE_SUGGEST") | |
| 187 | + private String guideSuggest; | |
| 188 | + /** | |
| 189 | + * 下次产检孕周数 | |
| 190 | + */ | |
| 191 | + @TableField(value = "NEXTINSPECT_NUM") | |
| 192 | + private Integer nextinspectNum; | |
| 193 | + /** | |
| 194 | + * 下次检查日期 | |
| 195 | + */ | |
| 196 | + @TableField(value = "NEXTINSPECT_TIME") | |
| 197 | + private Date nextinspectTime; | |
| 198 | + /** | |
| 199 | + * | |
| 200 | + */ | |
| 201 | + @TableField(value = "DOCTOR_ID") | |
| 202 | + private String doctorId; | |
| 203 | + /** | |
| 204 | + * 医院id | |
| 205 | + */ | |
| 206 | + @TableField(value = "ORG_ID") | |
| 207 | + private String orgId; | |
| 208 | + /** | |
| 209 | + * 诊断时间 | |
| 210 | + */ | |
| 211 | + @TableField(value = "DIAGNOSE_TIME") | |
| 212 | + private Date diagnoseTime; | |
| 213 | + | |
| 214 | + public String getId() { | |
| 215 | + return id; | |
| 216 | + } | |
| 217 | + | |
| 218 | + public void setId(String id) { | |
| 219 | + this.id = id; | |
| 220 | + } | |
| 221 | + | |
| 222 | + public String getWomanId() { | |
| 223 | + return womanId; | |
| 224 | + } | |
| 225 | + | |
| 226 | + public void setWomanId(String womanId) { | |
| 227 | + this.womanId = womanId; | |
| 228 | + } | |
| 229 | + | |
| 230 | + public Integer getType() { | |
| 231 | + return type; | |
| 232 | + } | |
| 233 | + | |
| 234 | + public void setType(Integer type) { | |
| 235 | + this.type = type; | |
| 236 | + } | |
| 237 | + | |
| 238 | + public Integer getYunNum() { | |
| 239 | + return yunNum; | |
| 240 | + } | |
| 241 | + | |
| 242 | + public void setYunNum(Integer yunNum) { | |
| 243 | + this.yunNum = yunNum; | |
| 244 | + } | |
| 245 | + | |
| 246 | + public Integer getChanNum() { | |
| 247 | + return chanNum; | |
| 248 | + } | |
| 249 | + | |
| 250 | + public void setChanNum(Integer chanNum) { | |
| 251 | + this.chanNum = chanNum; | |
| 252 | + } | |
| 253 | + | |
| 254 | + public Integer getShunNum() { | |
| 255 | + return shunNum; | |
| 256 | + } | |
| 257 | + | |
| 258 | + public void setShunNum(Integer shunNum) { | |
| 259 | + this.shunNum = shunNum; | |
| 260 | + } | |
| 261 | + | |
| 262 | + public Integer getPaoNum() { | |
| 263 | + return paoNum; | |
| 264 | + } | |
| 265 | + | |
| 266 | + public void setPaoNum(Integer paoNum) { | |
| 267 | + this.paoNum = paoNum; | |
| 268 | + } | |
| 269 | + | |
| 270 | + public Integer getLiuNum() { | |
| 271 | + return liuNum; | |
| 272 | + } | |
| 273 | + | |
| 274 | + public void setLiuNum(Integer liuNum) { | |
| 275 | + this.liuNum = liuNum; | |
| 276 | + } | |
| 277 | + | |
| 278 | + public Integer getZiranNum() { | |
| 279 | + return ziranNum; | |
| 280 | + } | |
| 281 | + | |
| 282 | + public void setZiranNum(Integer ziranNum) { | |
| 283 | + this.ziranNum = ziranNum; | |
| 284 | + } | |
| 285 | + | |
| 286 | + public Integer getRengongNum() { | |
| 287 | + return rengongNum; | |
| 288 | + } | |
| 289 | + | |
| 290 | + public void setRengongNum(Integer rengongNum) { | |
| 291 | + this.rengongNum = rengongNum; | |
| 292 | + } | |
| 293 | + | |
| 294 | + public Integer getSitaiNum() { | |
| 295 | + return sitaiNum; | |
| 296 | + } | |
| 297 | + | |
| 298 | + public void setSitaiNum(Integer sitaiNum) { | |
| 299 | + this.sitaiNum = sitaiNum; | |
| 300 | + } | |
| 301 | + | |
| 302 | + public Integer getSichanNum() { | |
| 303 | + return sichanNum; | |
| 304 | + } | |
| 305 | + | |
| 306 | + public void setSichanNum(Integer sichanNum) { | |
| 307 | + this.sichanNum = sichanNum; | |
| 308 | + } | |
| 309 | + | |
| 310 | + public Integer getChilddieNum() { | |
| 311 | + return childdieNum; | |
| 312 | + } | |
| 313 | + | |
| 314 | + public void setChilddieNum(Integer childdieNum) { | |
| 315 | + this.childdieNum = childdieNum; | |
| 316 | + } | |
| 317 | + | |
| 318 | + public Integer getBirthdefectNum() { | |
| 319 | + return birthdefectNum; | |
| 320 | + } | |
| 321 | + | |
| 322 | + public void setBirthdefectNum(Integer birthdefectNum) { | |
| 323 | + this.birthdefectNum = birthdefectNum; | |
| 324 | + } | |
| 325 | + | |
| 326 | + public Integer getHeight() { | |
| 327 | + return height; | |
| 328 | + } | |
| 329 | + | |
| 330 | + public void setHeight(Integer height) { | |
| 331 | + this.height = height; | |
| 332 | + } | |
| 333 | + | |
| 334 | + public Integer getWeight() { | |
| 335 | + return weight; | |
| 336 | + } | |
| 337 | + | |
| 338 | + public void setWeight(Integer weight) { | |
| 339 | + this.weight = weight; | |
| 340 | + } | |
| 341 | + | |
| 342 | + public Integer getHeightAgo() { | |
| 343 | + return heightAgo; | |
| 344 | + } | |
| 345 | + | |
| 346 | + public void setHeightAgo(Integer heightAgo) { | |
| 347 | + this.heightAgo = heightAgo; | |
| 348 | + } | |
| 349 | + | |
| 350 | + public Double getWeightIndex() { | |
| 351 | + return weightIndex; | |
| 352 | + } | |
| 353 | + | |
| 354 | + public void setWeightIndex(Double weightIndex) { | |
| 355 | + this.weightIndex = weightIndex; | |
| 356 | + } | |
| 357 | + | |
| 358 | + public Integer getBloodShrink() { | |
| 359 | + return bloodShrink; | |
| 360 | + } | |
| 361 | + | |
| 362 | + public void setBloodShrink(Integer bloodShrink) { | |
| 363 | + this.bloodShrink = bloodShrink; | |
| 364 | + } | |
| 365 | + | |
| 366 | + public Integer getBloodDiastole() { | |
| 367 | + return bloodDiastole; | |
| 368 | + } | |
| 369 | + | |
| 370 | + public void setBloodDiastole(Integer bloodDiastole) { | |
| 371 | + this.bloodDiastole = bloodDiastole; | |
| 372 | + } | |
| 373 | + | |
| 374 | + public String getHeart() { | |
| 375 | + return heart; | |
| 376 | + } | |
| 377 | + | |
| 378 | + public void setHeart(String heart) { | |
| 379 | + this.heart = heart; | |
| 380 | + } | |
| 381 | + | |
| 382 | + public String getLung() { | |
| 383 | + return lung; | |
| 384 | + } | |
| 385 | + | |
| 386 | + public void setLung(String lung) { | |
| 387 | + this.lung = lung; | |
| 388 | + } | |
| 389 | + | |
| 390 | + public String getWaiyinWoman() { | |
| 391 | + return waiyinWoman; | |
| 392 | + } | |
| 393 | + | |
| 394 | + public void setWaiyinWoman(String waiyinWoman) { | |
| 395 | + this.waiyinWoman = waiyinWoman; | |
| 396 | + } | |
| 397 | + | |
| 398 | + public String getYindaoWoman() { | |
| 399 | + return yindaoWoman; | |
| 400 | + } | |
| 401 | + | |
| 402 | + public void setYindaoWoman(String yindaoWoman) { | |
| 403 | + this.yindaoWoman = yindaoWoman; | |
| 404 | + } | |
| 405 | + | |
| 406 | + public String getGongjingWoman() { | |
| 407 | + return gongjingWoman; | |
| 408 | + } | |
| 409 | + | |
| 410 | + public void setGongjingWoman(String gongjingWoman) { | |
| 411 | + this.gongjingWoman = gongjingWoman; | |
| 412 | + } | |
| 413 | + | |
| 414 | + public String getZigongWoman() { | |
| 415 | + return zigongWoman; | |
| 416 | + } | |
| 417 | + | |
| 418 | + public void setZigongWoman(String zigongWoman) { | |
| 419 | + this.zigongWoman = zigongWoman; | |
| 420 | + } | |
| 421 | + | |
| 422 | + public String getFujianWoman() { | |
| 423 | + return fujianWoman; | |
| 424 | + } | |
| 425 | + | |
| 426 | + public void setFujianWoman(String fujianWoman) { | |
| 427 | + this.fujianWoman = fujianWoman; | |
| 428 | + } | |
| 429 | + | |
| 430 | + public Integer getGonggaoObstetrics() { | |
| 431 | + return gonggaoObstetrics; | |
| 432 | + } | |
| 433 | + | |
| 434 | + public void setGonggaoObstetrics(Integer gonggaoObstetrics) { | |
| 435 | + this.gonggaoObstetrics = gonggaoObstetrics; | |
| 436 | + } | |
| 437 | + | |
| 438 | + public Integer getFuweiObstetrics() { | |
| 439 | + return fuweiObstetrics; | |
| 440 | + } | |
| 441 | + | |
| 442 | + public void setFuweiObstetrics(Integer fuweiObstetrics) { | |
| 443 | + this.fuweiObstetrics = fuweiObstetrics; | |
| 444 | + } | |
| 445 | + | |
| 446 | + public Integer getFuzhongObstetrics() { | |
| 447 | + return fuzhongObstetrics; | |
| 448 | + } | |
| 449 | + | |
| 450 | + public void setFuzhongObstetrics(Integer fuzhongObstetrics) { | |
| 451 | + this.fuzhongObstetrics = fuzhongObstetrics; | |
| 452 | + } | |
| 453 | + | |
| 454 | + public Integer getTaishuObstetrics() { | |
| 455 | + return taishuObstetrics; | |
| 456 | + } | |
| 457 | + | |
| 458 | + public void setTaishuObstetrics(Integer taishuObstetrics) { | |
| 459 | + this.taishuObstetrics = taishuObstetrics; | |
| 460 | + } | |
| 461 | + | |
| 462 | + public String getDisposeSuggest() { | |
| 463 | + return disposeSuggest; | |
| 464 | + } | |
| 465 | + | |
| 466 | + public void setDisposeSuggest(String disposeSuggest) { | |
| 467 | + this.disposeSuggest = disposeSuggest; | |
| 468 | + } | |
| 469 | + | |
| 470 | + public String getGuideSuggest() { | |
| 471 | + return guideSuggest; | |
| 472 | + } | |
| 473 | + | |
| 474 | + public void setGuideSuggest(String guideSuggest) { | |
| 475 | + this.guideSuggest = guideSuggest; | |
| 476 | + } | |
| 477 | + | |
| 478 | + public Integer getNextinspectNum() { | |
| 479 | + return nextinspectNum; | |
| 480 | + } | |
| 481 | + | |
| 482 | + public void setNextinspectNum(Integer nextinspectNum) { | |
| 483 | + this.nextinspectNum = nextinspectNum; | |
| 484 | + } | |
| 485 | + | |
| 486 | + public Date getNextinspectTime() { | |
| 487 | + return nextinspectTime; | |
| 488 | + } | |
| 489 | + | |
| 490 | + public void setNextinspectTime(Date nextinspectTime) { | |
| 491 | + this.nextinspectTime = nextinspectTime; | |
| 492 | + } | |
| 493 | + | |
| 494 | + public String getDoctorId() { | |
| 495 | + return doctorId; | |
| 496 | + } | |
| 497 | + | |
| 498 | + public void setDoctorId(String doctorId) { | |
| 499 | + this.doctorId = doctorId; | |
| 500 | + } | |
| 501 | + | |
| 502 | + public String getOrgId() { | |
| 503 | + return orgId; | |
| 504 | + } | |
| 505 | + | |
| 506 | + public void setOrgId(String orgId) { | |
| 507 | + this.orgId = orgId; | |
| 508 | + } | |
| 509 | + | |
| 510 | + public Date getDiagnoseTime() { | |
| 511 | + return diagnoseTime; | |
| 512 | + } | |
| 513 | + | |
| 514 | + public void setDiagnoseTime(Date diagnoseTime) { | |
| 515 | + this.diagnoseTime = diagnoseTime; | |
| 516 | + } | |
| 517 | + | |
| 518 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/entity/woman/WomanCheckTicket.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.entity.woman; | |
| 2 | + | |
| 3 | +import com.baomidou.mybatisplus.annotations.TableId; | |
| 4 | +import com.baomidou.mybatisplus.annotations.TableField; | |
| 5 | +import com.baomidou.mybatisplus.annotations.TableName; | |
| 6 | +import java.io.Serializable; | |
| 7 | +import java.util.Date; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * <p> | |
| 11 | + * 产检劵记录表 | |
| 12 | + * </p> | |
| 13 | + * | |
| 14 | + * @author jiangjiazhi | |
| 15 | + * @since 2017-03-31 | |
| 16 | + */ | |
| 17 | +@TableName("WOMAN_CHECK_TICKET") | |
| 18 | +public class WomanCheckTicket implements Serializable { | |
| 19 | + | |
| 20 | + private static final long serialVersionUID = 1L; | |
| 21 | + | |
| 22 | + /** | |
| 23 | + * | |
| 24 | + */ | |
| 25 | + @TableId(value="ID") | |
| 26 | + private String id; | |
| 27 | + /** | |
| 28 | + * 建档记录id | |
| 29 | + */ | |
| 30 | + @TableField(value="WOMAN_ID") | |
| 31 | + private String womanId; | |
| 32 | + /** | |
| 33 | + * 发产检劵id | |
| 34 | + */ | |
| 35 | + @TableField(value="HOSPITAL_ID") | |
| 36 | + private String hospitalId; | |
| 37 | + /** | |
| 38 | + * PERSON id | |
| 39 | + */ | |
| 40 | + @TableField(value="PID") | |
| 41 | + private String pid; | |
| 42 | + /** | |
| 43 | + * 消费医院id | |
| 44 | + */ | |
| 45 | + @TableField(value="CONSUME_HOSPITAL_ID") | |
| 46 | + private String consumeHospitalId; | |
| 47 | + /** | |
| 48 | + * // 1:创建未使用, 2:产检使用,3:分娩销毁 4:建档删除 删除 | |
| 49 | + */ | |
| 50 | + @TableField(value="STATUS") | |
| 51 | + private Integer status; | |
| 52 | + /** | |
| 53 | + * | |
| 54 | + */ | |
| 55 | + @TableField(value="CREATE_TIME") | |
| 56 | + private Date createTime; | |
| 57 | + /** | |
| 58 | + * | |
| 59 | + */ | |
| 60 | + @TableField(value="CONSUME_TIME") | |
| 61 | + private Date consumeTime; | |
| 62 | + | |
| 63 | + | |
| 64 | + public String getId() { | |
| 65 | + return id; | |
| 66 | + } | |
| 67 | + | |
| 68 | + public void setId(String id) { | |
| 69 | + this.id = id; | |
| 70 | + } | |
| 71 | + | |
| 72 | + public String getWomanId() { | |
| 73 | + return womanId; | |
| 74 | + } | |
| 75 | + | |
| 76 | + public void setWomanId(String womanId) { | |
| 77 | + this.womanId = womanId; | |
| 78 | + } | |
| 79 | + | |
| 80 | + public String getHospitalId() { | |
| 81 | + return hospitalId; | |
| 82 | + } | |
| 83 | + | |
| 84 | + public void setHospitalId(String hospitalId) { | |
| 85 | + this.hospitalId = hospitalId; | |
| 86 | + } | |
| 87 | + | |
| 88 | + public String getPid() { | |
| 89 | + return pid; | |
| 90 | + } | |
| 91 | + | |
| 92 | + public void setPid(String pid) { | |
| 93 | + this.pid = pid; | |
| 94 | + } | |
| 95 | + | |
| 96 | + public String getConsumeHospitalId() { | |
| 97 | + return consumeHospitalId; | |
| 98 | + } | |
| 99 | + | |
| 100 | + public void setConsumeHospitalId(String consumeHospitalId) { | |
| 101 | + this.consumeHospitalId = consumeHospitalId; | |
| 102 | + } | |
| 103 | + | |
| 104 | + public Integer getStatus() { | |
| 105 | + return status; | |
| 106 | + } | |
| 107 | + | |
| 108 | + public void setStatus(Integer status) { | |
| 109 | + this.status = status; | |
| 110 | + } | |
| 111 | + | |
| 112 | + public Date getCreateTime() { | |
| 113 | + return createTime; | |
| 114 | + } | |
| 115 | + | |
| 116 | + public void setCreateTime(Date createTime) { | |
| 117 | + this.createTime = createTime; | |
| 118 | + } | |
| 119 | + | |
| 120 | + public Date getConsumeTime() { | |
| 121 | + return consumeTime; | |
| 122 | + } | |
| 123 | + | |
| 124 | + public void setConsumeTime(Date consumeTime) { | |
| 125 | + this.consumeTime = consumeTime; | |
| 126 | + } | |
| 127 | + | |
| 128 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/entity/woman/WomanFetationRecord.java
View file @
24d0e2c
| ... | ... | @@ -168,12 +168,12 @@ |
| 168 | 168 | * 末次月经 |
| 169 | 169 | */ |
| 170 | 170 | @TableField(value="HOSPITAL_LAST_MENSTRUATION") |
| 171 | - private String hospitalLastMenstruation; | |
| 171 | + private Date hospitalLastMenstruation; | |
| 172 | 172 | /** |
| 173 | 173 | * 纠正末次月经 |
| 174 | 174 | */ |
| 175 | 175 | @TableField(value="HOSPITAL_CORRECT_LAST_MENSTRUATION") |
| 176 | - private String hospitalCorrectLastMenstruation; | |
| 176 | + private Date hospitalCorrectLastMenstruation; | |
| 177 | 177 | /** |
| 178 | 178 | * 预产期 |
| 179 | 179 | */ |
| 180 | 180 | |
| 181 | 181 | |
| 182 | 182 | |
| ... | ... | @@ -508,19 +508,19 @@ |
| 508 | 508 | this.contactPostpartumDetail = contactPostpartumDetail; |
| 509 | 509 | } |
| 510 | 510 | |
| 511 | - public String getHospitalLastMenstruation() { | |
| 511 | + public Date getHospitalLastMenstruation() { | |
| 512 | 512 | return hospitalLastMenstruation; |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | - public void setHospitalLastMenstruation(String hospitalLastMenstruation) { | |
| 515 | + public void setHospitalLastMenstruation(Date hospitalLastMenstruation) { | |
| 516 | 516 | this.hospitalLastMenstruation = hospitalLastMenstruation; |
| 517 | 517 | } |
| 518 | 518 | |
| 519 | - public String getHospitalCorrectLastMenstruation() { | |
| 519 | + public Date getHospitalCorrectLastMenstruation() { | |
| 520 | 520 | return hospitalCorrectLastMenstruation; |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | - public void setHospitalCorrectLastMenstruation(String hospitalCorrectLastMenstruation) { | |
| 523 | + public void setHospitalCorrectLastMenstruation(Date hospitalCorrectLastMenstruation) { | |
| 524 | 524 | this.hospitalCorrectLastMenstruation = hospitalCorrectLastMenstruation; |
| 525 | 525 | } |
| 526 | 526 |
parent/hospital.mac/src/main/java/com/lyms/hospital/enums/DiagnoseTypeEnums.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.enums; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * 添加类的一句话简单描述。 | |
| 5 | + * <p/> | |
| 6 | + * 详细描述 | |
| 7 | + * <p/> | |
| 8 | + * 示例代码 | |
| 9 | + * <pre> | |
| 10 | + * </pre> | |
| 11 | + * | |
| 12 | + * @author JiaZhi.Jiang | |
| 13 | + * @version PLATFORM V100R001 2017-3-31 | |
| 14 | + * @since PLATFORM V100R001C40B104 | |
| 15 | + */ | |
| 16 | + | |
| 17 | +public enum DiagnoseTypeEnums { | |
| 18 | + // 0为初诊,1为复诊 | |
| 19 | + | |
| 20 | + CHUZHEN(0), FUZHEN(1); | |
| 21 | + | |
| 22 | + private DiagnoseTypeEnums(int type) { | |
| 23 | + this.type = type; | |
| 24 | + } | |
| 25 | + | |
| 26 | + private int type; | |
| 27 | + | |
| 28 | + public int getType() { | |
| 29 | + return type; | |
| 30 | + } | |
| 31 | + | |
| 32 | + public static DiagnoseTypeEnums getEnumType(int type) { | |
| 33 | + for (DiagnoseTypeEnums e : values()) { | |
| 34 | + if (type == e.getType()) { | |
| 35 | + return e; | |
| 36 | + } | |
| 37 | + } | |
| 38 | + return null; | |
| 39 | + } | |
| 40 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/service/diagnose/DiagnoseAssitService.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.service.diagnose; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import com.lyms.hospital.entity.diagnose.DiagnoseAssit; | |
| 6 | +import com.lyms.web.service.BaseService; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * <p> | |
| 10 | + * 服务类 | |
| 11 | + * </p> | |
| 12 | + * | |
| 13 | + * @author jiangjiazhi | |
| 14 | + * @since 2017-03-29 | |
| 15 | + */ | |
| 16 | +public interface DiagnoseAssitService extends BaseService<DiagnoseAssit> { | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 20 | + * <li>@param id 删除主键id | |
| 21 | + * <li>@return 大于0修改成功,否则为失败 | |
| 22 | + */ | |
| 23 | + public Integer deleteLogicById(Serializable id); | |
| 24 | + | |
| 25 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/service/diagnose/DiagnoseInfoService.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.service.diagnose; | |
| 2 | + | |
| 3 | +import com.lyms.hospital.entity.diagnose.DiagnoseInfo; | |
| 4 | +import com.lyms.web.service.BaseService; | |
| 5 | +import java.io.Serializable; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * <p> | |
| 9 | + * 服务类 | |
| 10 | + * </p> | |
| 11 | + * | |
| 12 | + * @author jiangjiazhi | |
| 13 | + * @since 2017-03-28 | |
| 14 | + */ | |
| 15 | +public interface DiagnoseInfoService extends BaseService<DiagnoseInfo> { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 19 | + * <li>@param id 删除主键id | |
| 20 | + * <li>@return 大于0修改成功,否则为失败 | |
| 21 | + */ | |
| 22 | + public Integer deleteLogicById(Serializable id); | |
| 23 | + | |
| 24 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/service/diagnose/impl/DiagnoseAssitServiceImpl.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.service.diagnose.impl; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | + | |
| 5 | +import org.springframework.stereotype.Service; | |
| 6 | + | |
| 7 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 8 | +import com.lyms.hospital.dao.woman.DiagnoseAssitMapper; | |
| 9 | +import com.lyms.hospital.entity.diagnose.DiagnoseAssit; | |
| 10 | +import com.lyms.hospital.service.diagnose.DiagnoseAssitService; | |
| 11 | + | |
| 12 | +/** | |
| 13 | + * <p> | |
| 14 | + * 辅助检查项 服务实现类 | |
| 15 | + * </p> | |
| 16 | + * | |
| 17 | + * @author jiangjiazhi | |
| 18 | + * @since 2017-03-29 | |
| 19 | + */ | |
| 20 | +@Service | |
| 21 | +public class DiagnoseAssitServiceImpl extends ServiceImpl<DiagnoseAssitMapper, DiagnoseAssit> implements | |
| 22 | + DiagnoseAssitService { | |
| 23 | + | |
| 24 | + public Integer deleteLogicById(Serializable id) { | |
| 25 | + return baseMapper.deleteLogicById(id); | |
| 26 | + } | |
| 27 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/service/diagnose/impl/DiagnoseInfoServiceImpl.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.service.diagnose.impl; | |
| 2 | + | |
| 3 | +import java.io.Serializable; | |
| 4 | +import java.util.List; | |
| 5 | + | |
| 6 | +import org.apache.commons.lang.StringUtils; | |
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | +import org.springframework.transaction.annotation.Transactional; | |
| 10 | + | |
| 11 | +import com.baomidou.mybatisplus.mapper.EntityWrapper; | |
| 12 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 13 | +import com.lyms.hospital.dao.diagnose.DiagnoseInfoMapper; | |
| 14 | +import com.lyms.hospital.entity.diagnose.DiagnoseAssit; | |
| 15 | +import com.lyms.hospital.entity.diagnose.DiagnoseInfo; | |
| 16 | +import com.lyms.hospital.service.diagnose.DiagnoseAssitService; | |
| 17 | +import com.lyms.hospital.service.diagnose.DiagnoseInfoService; | |
| 18 | +import com.lyms.util.StrUtils; | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * <p> | |
| 22 | + * 诊断信息表,包含初诊、复诊信息 服务实现类 | |
| 23 | + * </p> | |
| 24 | + * | |
| 25 | + * @author jiangjiazhi | |
| 26 | + * @link DiagnoseTypeEnums 初诊 复诊 分类接口 | |
| 27 | + * @since 2017-03-28 | |
| 28 | + */ | |
| 29 | +@Service | |
| 30 | +public class DiagnoseInfoServiceImpl extends ServiceImpl<DiagnoseInfoMapper, DiagnoseInfo> implements | |
| 31 | + DiagnoseInfoService { | |
| 32 | + | |
| 33 | + @Autowired | |
| 34 | + private DiagnoseAssitService diagnoseAssitService; | |
| 35 | + | |
| 36 | + public Integer deleteLogicById(Serializable id) { | |
| 37 | + return baseMapper.deleteLogicById(id); | |
| 38 | + } | |
| 39 | + | |
| 40 | + @Transactional | |
| 41 | + public void addOrUpdate(DiagnoseInfo dInfo, DiagnoseAssit diagnoseAssit) { | |
| 42 | + if (StringUtils.isEmpty(dInfo.getId())) { | |
| 43 | + dInfo.setId(StrUtils.uuid()); | |
| 44 | + insert(dInfo); | |
| 45 | + if (StringUtils.isEmpty(diagnoseAssit.getId())) { | |
| 46 | + diagnoseAssit.setId(StrUtils.uuid()); | |
| 47 | + } | |
| 48 | + diagnoseAssit.setDiagnoseId(dInfo.getId()); | |
| 49 | + diagnoseAssitService.insert(diagnoseAssit); | |
| 50 | + } else { | |
| 51 | + updateById(dInfo); | |
| 52 | + diagnoseAssitService.updateById(diagnoseAssit); | |
| 53 | + } | |
| 54 | + } | |
| 55 | + | |
| 56 | + /** | |
| 57 | + * 根据建档记录id查询所有有效的产检记录 | |
| 58 | + * | |
| 59 | + * <li>@param parentId 建档id | |
| 60 | + * <li>@return | |
| 61 | + * <li>创建人:Administrator | |
| 62 | + * <li>创建时间:2017-3-31 | |
| 63 | + * <li>修改人: | |
| 64 | + * <li>修改时间: | |
| 65 | + */ | |
| 66 | + public List<DiagnoseInfo> findListByParentId(String parentId) { | |
| 67 | + EntityWrapper<DiagnoseInfo> ew = new EntityWrapper<DiagnoseInfo>(); | |
| 68 | + ew.where("WOMAN_ID={0}", parentId); | |
| 69 | + return selectList(ew); | |
| 70 | + } | |
| 71 | + | |
| 72 | + /** | |
| 73 | + * | |
| 74 | + * 根据条件查询产检信息 | |
| 75 | + * | |
| 76 | + * <li>@param type | |
| 77 | + * <li>@param cardNum | |
| 78 | + * <li>@return | |
| 79 | + * <li>创建人:Administrator | |
| 80 | + * <li>创建时间:2017-3-31 | |
| 81 | + * <li>修改人: | |
| 82 | + * <li>修改时间: | |
| 83 | + */ | |
| 84 | + public DiagnoseInfo findByCond(int type, String cardNum) { | |
| 85 | + EntityWrapper<DiagnoseInfo> ew = new EntityWrapper<DiagnoseInfo>(); | |
| 86 | + ew.where("type={0}", type).and("BASE_PAPERS_NUMBER={0}", cardNum).orderBy("DIAGNOSE_TIME", Boolean.FALSE); | |
| 87 | + return (DiagnoseInfo) selectObj(ew); | |
| 88 | + } | |
| 89 | + | |
| 90 | + /** | |
| 91 | + * 查询这个人所有的产检记录 | |
| 92 | + * | |
| 93 | + * <li>@param pid | |
| 94 | + * <li>@return | |
| 95 | + * <li>创建人:Administrator | |
| 96 | + * <li>创建时间:2017-3-31 | |
| 97 | + * <li>修改人: | |
| 98 | + * <li>修改时间: | |
| 99 | + */ | |
| 100 | + public List<DiagnoseInfo> findListByPid(String pid) { | |
| 101 | + EntityWrapper<DiagnoseInfo> ew = new EntityWrapper<DiagnoseInfo>(); | |
| 102 | + ew.where("pid={0}", pid); | |
| 103 | + return selectList(ew); | |
| 104 | + } | |
| 105 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/service/history/impl/HistorySourceServiceImpl.java
View file @
24d0e2c
| ... | ... | @@ -32,7 +32,7 @@ |
| 32 | 32 | EntityWrapper<HistorySource> ew = new EntityWrapper<HistorySource>(); |
| 33 | 33 | ew.where("enable=1"); |
| 34 | 34 | if(historyPatientType.length > 0){ |
| 35 | - ew.and("type={0}", "'"+historyPatientType[0]+"'"); | |
| 35 | + ew.and("type={0}", historyPatientType[0]); | |
| 36 | 36 | } |
| 37 | 37 | ew.orderBy("itemorder"); |
| 38 | 38 | dataList = selectList(ew); |
parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/WomanCheckTicketService.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.service.woman; | |
| 2 | + | |
| 3 | +import com.lyms.hospital.entity.woman.WomanCheckTicket; | |
| 4 | +import com.lyms.web.service.BaseService; | |
| 5 | +import java.io.Serializable; | |
| 6 | + | |
| 7 | +/** | |
| 8 | + * <p> | |
| 9 | + * 服务类 | |
| 10 | + * </p> | |
| 11 | + * | |
| 12 | + * @author jiangjiazhi | |
| 13 | + * @since 2017-03-31 | |
| 14 | + */ | |
| 15 | +public interface WomanCheckTicketService extends BaseService<WomanCheckTicket> { | |
| 16 | + | |
| 17 | + /** | |
| 18 | + * <li>@Description:逻辑删除,ifDel = 1 为删除,否则为没有删除 | |
| 19 | + * <li>@param id 删除主键id | |
| 20 | + * <li>@return 大于0修改成功,否则为失败 | |
| 21 | + */ | |
| 22 | + public Integer deleteLogicById(Serializable id); | |
| 23 | + | |
| 24 | +} |
parent/hospital.mac/src/main/java/com/lyms/hospital/service/woman/impl/WomanCheckTicketServiceImpl.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.service.woman.impl; | |
| 2 | + | |
| 3 | +import com.lyms.hospital.entity.woman.WomanCheckTicket; | |
| 4 | +import com.lyms.hospital.dao.woman.WomanCheckTicketMapper; | |
| 5 | +import com.lyms.hospital.service.woman.WomanCheckTicketService; | |
| 6 | +import com.baomidou.mybatisplus.service.impl.ServiceImpl; | |
| 7 | +import org.springframework.stereotype.Service; | |
| 8 | +import java.io.Serializable; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * <p> | |
| 12 | + * 产检劵记录表 服务实现类 | |
| 13 | + * </p> | |
| 14 | + * | |
| 15 | + * @author JIAZHI.JIANG | |
| 16 | + * @since 2017-03-31 | |
| 17 | + */ | |
| 18 | +@Service | |
| 19 | +public class WomanCheckTicketServiceImpl extends ServiceImpl<WomanCheckTicketMapper, WomanCheckTicket> implements WomanCheckTicketService { | |
| 20 | + | |
| 21 | + public Integer deleteLogicById(Serializable id){ | |
| 22 | + return baseMapper.deleteLogicById(id); | |
| 23 | + } | |
| 24 | +} |
parent/hospital.web/src/main/java/com/lyms/hospital/util/CompressEncodeingUtil.java
View file @
24d0e2c
| 1 | +package com.lyms.hospital.util; | |
| 2 | + | |
| 3 | +import com.lyms.util.DateUtil; | |
| 4 | + | |
| 5 | +/** | |
| 6 | + * 水印生成代码 | |
| 7 | + * | |
| 8 | + */ | |
| 9 | +public class CompressEncodeingUtil | |
| 10 | +{ | |
| 11 | + | |
| 12 | + final static char[] digits = { | |
| 13 | + '0' , '1' , '2' , '3' , '4' , '5' , | |
| 14 | + '6' , '7' , '8' , '9' , 'a' , 'b' , | |
| 15 | + 'c' , 'd' , 'e' , 'f' , 'g' , 'h' , | |
| 16 | + 'i' , 'j' , 'k' , 'l' , 'm' , 'n' , | |
| 17 | + 'o' , 'p' , 'q' , 'r' , 's' , 't' , | |
| 18 | + 'u' , 'v' , 'w' , 'x' , 'y' , 'z' , | |
| 19 | + 'A' , 'B' , 'C' , 'D' , 'E' , 'F' , | |
| 20 | + 'G' , 'H' , 'I' , 'J' , 'K' , 'L' , | |
| 21 | + 'M' , 'N' , 'O' , 'P' , 'Q' , 'R' , | |
| 22 | + 'S' , 'T' , 'U' , 'V' , 'W' , 'X' , | |
| 23 | + 'Y' , 'Z' , '$' , '!' , | |
| 24 | + }; | |
| 25 | + | |
| 26 | + /** | |
| 27 | + * 把10进制的数字转换成64进制 | |
| 28 | + * @param number | |
| 29 | + * @return | |
| 30 | + */ | |
| 31 | + public static String compressNumber(String number) { | |
| 32 | + return compressNumber(Long.valueOf(number)); | |
| 33 | + } | |
| 34 | + | |
| 35 | + /** | |
| 36 | + * 把10进制的数字转换成64进制 | |
| 37 | + * @param number | |
| 38 | + * @return | |
| 39 | + */ | |
| 40 | + public static String compressNumber(long number) { | |
| 41 | + System.out.println(number); | |
| 42 | + char[] buf = new char[64]; | |
| 43 | + int charPos = 64; | |
| 44 | + int radix = 1 << 6; | |
| 45 | + long mask = radix - 1; | |
| 46 | + do { | |
| 47 | + buf[--charPos] = digits[(int)(number & mask)]; | |
| 48 | + number >>>= 6; | |
| 49 | + } while (number != 0); | |
| 50 | + return new String(buf, charPos, (64 - charPos)); | |
| 51 | + } | |
| 52 | + /** | |
| 53 | + * 把64进制的字符串转换成10进制 | |
| 54 | + * @param decompStr | |
| 55 | + * @return | |
| 56 | + */ | |
| 57 | + public static long unCompressNumber(String decompStr) | |
| 58 | + { | |
| 59 | + long result=0; | |
| 60 | + for (int i = decompStr.length()-1; i >=0; i--) { | |
| 61 | + if(i==decompStr.length()) | |
| 62 | + { | |
| 63 | + result+=getCharIndexNum(decompStr.charAt(i)); | |
| 64 | + continue; | |
| 65 | + } | |
| 66 | + for (int j = 0; j < digits.length; j++) { | |
| 67 | + if(decompStr.charAt(i)==digits[j]) | |
| 68 | + { | |
| 69 | + result+=((long)j)<<6*(decompStr.length()-1-i); | |
| 70 | + } | |
| 71 | + } | |
| 72 | + } | |
| 73 | + return result; | |
| 74 | + } | |
| 75 | + /** | |
| 76 | + * | |
| 77 | + * @param ch | |
| 78 | + * @return | |
| 79 | + */ | |
| 80 | + private static long getCharIndexNum(char ch) | |
| 81 | + { | |
| 82 | + int num=((int)ch); | |
| 83 | + if(num>=48&&num<=57) | |
| 84 | + { | |
| 85 | + return num-48; | |
| 86 | + } | |
| 87 | + else if(num>=97&&num<=122) | |
| 88 | + { | |
| 89 | + return num-87; | |
| 90 | + }else if(num>=65&&num<=90) | |
| 91 | + { | |
| 92 | + return num-29; | |
| 93 | + }else if(num==43) | |
| 94 | + { | |
| 95 | + return 62; | |
| 96 | + } | |
| 97 | + else if (num == 47) | |
| 98 | + { | |
| 99 | + return 63; | |
| 100 | + } | |
| 101 | + return 0; | |
| 102 | + } | |
| 103 | + | |
| 104 | + /** | |
| 105 | + * 获取水印 | |
| 106 | + * @param userId | |
| 107 | + * @return | |
| 108 | + */ | |
| 109 | + public static String getWaterMark(String userId){ | |
| 110 | + return CompressEncodeingUtil.compressNumber(userId + DateUtil.getymd6()); | |
| 111 | + } | |
| 112 | +} |
parent/hospital.web/src/test/java/test/hospital/highrisk/HighriskMapsTest.java
View file @
24d0e2c
| ... | ... | @@ -6,8 +6,6 @@ |
| 6 | 6 | import com.lyms.base.common.entity.conf.HighriskMaps; |
| 7 | 7 | import com.lyms.base.common.service.conf.HighriskMapsService; |
| 8 | 8 | import com.lyms.util.StrUtils; |
| 9 | - | |
| 10 | -import antlr.StringUtils; | |
| 11 | 9 | import test.hospital.BaseServiceTest; |
| 12 | 10 | |
| 13 | 11 | public class HighriskMapsTest extends BaseServiceTest{ |
parent/mybatis-plus/src/test/java/com/baomidou/mybatisplus/test/generator/MysqlGenerator.java
View file @
24d0e2c
| ... | ... | @@ -48,11 +48,11 @@ |
| 48 | 48 | |
| 49 | 49 | // strategy.setInclude(new String[] { |
| 50 | 50 | // "SYS_USERS","SYS_USER_ROLE_MAPS","SYS_ROLES" }); // 需要生成的表 |
| 51 | - strategy.setInclude(new String[] { "HISTORY_SOURCE"}); // 需要生成的表 | |
| 51 | + strategy.setInclude(new String[] { "SYS_ORGANIZATIONS_CONF"}); // 需要生成的表 | |
| 52 | 52 | // pc.setParent("com.lyms.hospital"); |
| 53 | - pc.setParent("com.lyms.hospital"); | |
| 53 | + pc.setParent("com.lyms.base.common"); | |
| 54 | 54 | |
| 55 | - pc.setFunctionName("history"); // com.lyms.hospital.web.controller.sys | |
| 55 | + pc.setFunctionName("organ"); // com.lyms.hospital.web.controller.sys | |
| 56 | 56 | // 加在controller后面 |
| 57 | 57 | // pc.setModuleName("sys"); //com.lyms.hospital.sys.controller |
| 58 | 58 | // 加在controller前面 |
| 59 | 59 | |
| ... | ... | @@ -103,9 +103,9 @@ |
| 103 | 103 | DataSourceConfig dsc = new DataSourceConfig(); |
| 104 | 104 | dsc.setDbType(DbType.MYSQL); |
| 105 | 105 | dsc.setDriverName("com.mysql.jdbc.Driver"); |
| 106 | - dsc.setUsername("hospital"); | |
| 106 | + dsc.setUsername("center"); | |
| 107 | 107 | dsc.setPassword("lyms2015"); |
| 108 | - dsc.setUrl("jdbc:mysql://119.90.57.26:3306/hospital?characterEncoding=utf8"); | |
| 108 | + dsc.setUrl("jdbc:mysql://119.90.57.26:3306/center?characterEncoding=utf8"); | |
| 109 | 109 | mpg.setDataSource(dsc); |
| 110 | 110 | |
| 111 | 111 | // 策略配置 |
parent/pom.xml
View file @
24d0e2c
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | <mysql.jdbc.version>5.1.34</mysql.jdbc.version> |
| 12 | 12 | <spring.version>4.2.5.RELEASE</spring.version> |
| 13 | 13 | <aspectjweaver.version>1.8.9</aspectjweaver.version> |
| 14 | - <mybatis-plus.version>2.0.1</mybatis-plus.version> | |
| 14 | + <mybatis-plus.version>2.0.5</mybatis-plus.version> | |
| 15 | 15 | <fastjson.version>1.2.8</fastjson.version> |
| 16 | 16 | <slf4j.version>1.7.21</slf4j.version> |
| 17 | 17 | <logback.version>1.0.13</logback.version> |
| ... | ... | @@ -272,6 +272,11 @@ |
| 272 | 272 | <groupId>com.qiniu</groupId> |
| 273 | 273 | <artifactId>qiniu-java-sdk</artifactId> |
| 274 | 274 | <version>${qiniu-java-sdk.version}</version> |
| 275 | + </dependency> | |
| 276 | + <dependency> | |
| 277 | + <groupId>com.google.guava</groupId> | |
| 278 | + <artifactId>guava</artifactId> | |
| 279 | + <version>19.0-rc2</version> | |
| 275 | 280 | </dependency> |
| 276 | 281 | </dependencies> |
| 277 | 282 | <build> |