Commit 1dd81c9eab3ff15c82ca548ddbba050b25f3aa5a
1 parent
000eb60503
Exists in
master
化验项添加selector选择
Showing 15 changed files with 178 additions and 44 deletions
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/AssayCustomerConfMapper.java
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/AssaySourceConfMapper.java
- parent/base.common/src/main/java/com/lyms/base/common/dao/conf/AssaySourceConfMapper.xml
- parent/base.common/src/main/java/com/lyms/base/common/entity/conf/AssaySourceConf.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/AssayCustomerConfService.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/AssaySourceConfService.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/AssaySourceService.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/AssayCustomerConfServiceImpl.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/AssaySourceConfServiceImpl.java
- parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/AssaySourceServiceImpl.java
- parent/center.manager/src/main/java/com/lyms/cm/controller/conf/AssayCustomerConfController.java
- parent/center.manager/src/main/java/com/lyms/cm/controller/conf/AssaySourceConfController.java
- parent/center.manager/src/main/webapp/WEB-INF/views/conf/assay/conf_edit.html
- parent/center.manager/src/main/webapp/WEB-INF/views/conf/assay/customer_edit.html
- parent/center.manager/src/main/webapp/WEB-INF/views/conf/assay/customer_list.html
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/AssayCustomerConfMapper.java
View file @
1dd81c9
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/AssaySourceConfMapper.java
View file @
1dd81c9
| ... | ... | @@ -4,6 +4,8 @@ |
| 4 | 4 | import com.baomidou.mybatisplus.mapper.BaseMapper; |
| 5 | 5 | import org.springframework.stereotype.Repository; |
| 6 | 6 | import java.io.Serializable; |
| 7 | +import java.util.List; | |
| 8 | + | |
| 7 | 9 | /** |
| 8 | 10 | * <p> |
| 9 | 11 | * Mapper接口 |
| ... | ... | @@ -16,6 +18,8 @@ |
| 16 | 18 | public interface AssaySourceConfMapper extends BaseMapper<AssaySourceConf> { |
| 17 | 19 | |
| 18 | 20 | public Integer deleteLogicById(Serializable id); |
| 21 | + | |
| 22 | + public List<AssaySourceConf> getAllEnableSourceConf(); | |
| 19 | 23 | |
| 20 | 24 | } |
parent/base.common/src/main/java/com/lyms/base/common/dao/conf/AssaySourceConfMapper.xml
View file @
1dd81c9
| ... | ... | @@ -2,28 +2,40 @@ |
| 2 | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | 3 | <mapper namespace="com.lyms.base.common.dao.conf.AssaySourceConfMapper"> |
| 4 | 4 | |
| 5 | - <!-- 通用查询映射结果 --> | |
| 6 | - <resultMap id="BaseResultMap" type="com.lyms.base.common.entity.conf.AssaySourceConf"> | |
| 7 | - <id column="ID" property="id" /> | |
| 8 | - <result column="SOURCE_ID" property="sourceId" /> | |
| 9 | - <result column="SAMPLE_SOUCE" property="sampleSouce" /> | |
| 10 | - <result column="SAMPLE_DESC" property="sampleDesc" /> | |
| 11 | - <result column="SAMPLE_TARGET" property="sampleTarget" /> | |
| 12 | - <result column="UNIT" property="unit" /> | |
| 13 | - <result column="DANGER_CHAR" property="dangerChar" /> | |
| 14 | - <result column="DANGER_UPPER" property="dangerUpper" /> | |
| 15 | - <result column="DANGER_UPPER_PRO" property="dangerUpperPro" /> | |
| 16 | - <result column="DANGER_UPPER_SERVICE" property="dangerUpperService" /> | |
| 17 | - <result column="DANGER_LOWER" property="dangerLower" /> | |
| 18 | - <result column="DANGER_LOWER_PRO" property="dangerLowerPro" /> | |
| 19 | - <result column="DANGER_LOWER_SERVICE" property="dangerLowerService" /> | |
| 20 | - <result column="ENABLE" property="enable" /> | |
| 21 | - <result column="IFDEL" property="ifdel" /> | |
| 22 | - </resultMap> | |
| 5 | + <!-- 通用查询映射结果 --> | |
| 6 | + <resultMap id="BaseResultMap" type="com.lyms.base.common.entity.conf.AssaySourceConf"> | |
| 7 | + <id column="ID" property="id"/> | |
| 8 | + <result column="SOURCE_ID" property="sourceId"/> | |
| 9 | + <result column="NAME" property="name"/> | |
| 10 | + <result column="SAMPLE_SOUCE" property="sampleSouce"/> | |
| 11 | + <result column="SAMPLE_DESC" property="sampleDesc"/> | |
| 12 | + <result column="SAMPLE_TARGET" property="sampleTarget"/> | |
| 13 | + <result column="UNIT" property="unit"/> | |
| 14 | + <result column="DANGER_CHAR" property="dangerChar"/> | |
| 15 | + <result column="DANGER_UPPER" property="dangerUpper"/> | |
| 16 | + <result column="DANGER_UPPER_PRO" property="dangerUpperPro"/> | |
| 17 | + <result column="DANGER_UPPER_SERVICE" property="dangerUpperService"/> | |
| 18 | + <result column="DANGER_LOWER" property="dangerLower"/> | |
| 19 | + <result column="DANGER_LOWER_PRO" property="dangerLowerPro"/> | |
| 20 | + <result column="DANGER_LOWER_SERVICE" property="dangerLowerService"/> | |
| 21 | + <result column="ENABLE" property="enable"/> | |
| 22 | + <result column="IFDEL" property="ifdel"/> | |
| 23 | + </resultMap> | |
| 23 | 24 | |
| 24 | 25 | <!-- 通用查询结果列 --> |
| 25 | 26 | <sql id="Base_Column_List"> |
| 26 | - ID AS id, SOURCE_ID AS sourceId, SAMPLE_SOUCE AS sampleSouce, SAMPLE_DESC AS sampleDesc, SAMPLE_TARGET AS sampleTarget, UNIT AS unit, DANGER_CHAR AS dangerChar, DANGER_UPPER AS dangerUpper, DANGER_UPPER_PRO AS dangerUpperPro, DANGER_UPPER_SERVICE AS dangerUpperService, DANGER_LOWER AS dangerLower, DANGER_LOWER_PRO AS dangerLowerPro, DANGER_LOWER_SERVICE AS dangerLowerService, ENABLE AS enable, IFDEL AS ifdel | |
| 27 | + ID AS id, SOURCE_ID AS sourceId, NAME AS name, SAMPLE_SOUCE AS sampleSouce, SAMPLE_DESC AS sampleDesc, SAMPLE_TARGET AS sampleTarget, UNIT AS unit, DANGER_CHAR AS dangerChar, DANGER_UPPER AS dangerUpper, DANGER_UPPER_PRO AS dangerUpperPro, DANGER_UPPER_SERVICE AS dangerUpperService, DANGER_LOWER AS dangerLower, DANGER_LOWER_PRO AS dangerLowerPro, DANGER_LOWER_SERVICE AS dangerLowerService, ENABLE AS enable, IFDEL AS ifdel | |
| 27 | 28 | </sql> |
| 29 | + | |
| 30 | + | |
| 31 | + <select id="getAllEnableSourceConf" resultMap="BaseResultMap"> | |
| 32 | + select | |
| 33 | + c.ID AS id, c.SOURCE_ID AS sourceId, c.SAMPLE_SOUCE AS sampleSouce, c.SAMPLE_DESC AS sampleDesc, | |
| 34 | + c.SAMPLE_TARGET AS sampleTarget, c.UNIT AS unit, c.DANGER_CHAR AS dangerChar, | |
| 35 | + c.DANGER_UPPER AS dangerUpper, c.DANGER_UPPER_PRO AS dangerUpperPro, c.DANGER_UPPER_SERVICE AS dangerUpperService, | |
| 36 | + c.DANGER_LOWER AS dangerLower, c.DANGER_LOWER_PRO AS dangerLowerPro, c.DANGER_LOWER_SERVICE AS dangerLowerService, | |
| 37 | + c.ENABLE AS enable, c.IFDEL AS ifdel ,s.name | |
| 38 | + from ASSAY_SOURCE_CONF c left join ASSAY_SOURCE s on c.SOURCE_ID = s.ID where c.IFDEL = 0 and c.`ENABLE` =1 | |
| 39 | + </select> | |
| 28 | 40 | </mapper> |
parent/base.common/src/main/java/com/lyms/base/common/entity/conf/AssaySourceConf.java
View file @
1dd81c9
| ... | ... | @@ -93,6 +93,11 @@ |
| 93 | 93 | */ |
| 94 | 94 | @TableField(value="IFDEL") |
| 95 | 95 | private Integer ifdel; |
| 96 | + /** | |
| 97 | + * 方化验项名称,联查获取 | |
| 98 | + */ | |
| 99 | + @TableField(exist = false) | |
| 100 | + private String name; | |
| 96 | 101 | |
| 97 | 102 | |
| 98 | 103 | public String getId() { |
| ... | ... | @@ -215,5 +220,12 @@ |
| 215 | 220 | this.ifdel = ifdel; |
| 216 | 221 | } |
| 217 | 222 | |
| 223 | + public String getName() { | |
| 224 | + return name; | |
| 225 | + } | |
| 226 | + | |
| 227 | + public void setName(String name) { | |
| 228 | + this.name = name; | |
| 229 | + } | |
| 218 | 230 | } |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/AssayCustomerConfService.java
View file @
1dd81c9
parent/base.common/src/main/java/com/lyms/base/common/service/conf/AssaySourceConfService.java
View file @
1dd81c9
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | import com.lyms.base.common.entity.conf.AssaySourceConf; |
| 4 | 4 | import com.lyms.web.service.BaseService; |
| 5 | 5 | import java.io.Serializable; |
| 6 | +import java.util.List; | |
| 6 | 7 | |
| 7 | 8 | /** |
| 8 | 9 | * <p> |
| ... | ... | @@ -20,6 +21,20 @@ |
| 20 | 21 | * <li>@return 大于0修改成功,否则为失败 |
| 21 | 22 | */ |
| 22 | 23 | public Integer deleteLogicById(Serializable id); |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 方法描述:获取所有启用化验项配置 | |
| 27 | + * @return | |
| 28 | + * @since 2017-05-27 | |
| 29 | + */ | |
| 30 | + public List<AssaySourceConf> getAllEnableSourceConf(); | |
| 31 | + | |
| 32 | + /** | |
| 33 | + * 方法描述: | |
| 34 | + * @return | |
| 35 | + * @since 2017-05-27 | |
| 36 | + */ | |
| 37 | + public String getSourceIdByConfId(String confId); | |
| 23 | 38 | |
| 24 | 39 | } |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/AssaySourceService.java
View file @
1dd81c9
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | import com.lyms.base.common.entity.conf.AssaySource; |
| 4 | 4 | import com.lyms.web.service.BaseService; |
| 5 | 5 | import java.io.Serializable; |
| 6 | +import java.util.List; | |
| 6 | 7 | |
| 7 | 8 | /** |
| 8 | 9 | * <p> |
| ... | ... | @@ -20,6 +21,13 @@ |
| 20 | 21 | * <li>@return 大于0修改成功,否则为失败 |
| 21 | 22 | */ |
| 22 | 23 | public Integer deleteLogicById(Serializable id); |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 方法描述:获取所有没有删除化验基础项 | |
| 27 | + * @return | |
| 28 | + * @since 2017-05-27 | |
| 29 | + */ | |
| 30 | + public List<AssaySource> getAllSource(); | |
| 23 | 31 | |
| 24 | 32 | |
| 25 | 33 | } |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/AssayCustomerConfServiceImpl.java
View file @
1dd81c9
| 1 | 1 | package com.lyms.base.common.service.conf.impl; |
| 2 | 2 | |
| 3 | 3 | import com.lyms.base.common.entity.conf.AssayCustomerConf; |
| 4 | +import com.lyms.base.common.entity.conf.AssaySource; | |
| 4 | 5 | import com.lyms.base.common.entity.conf.AssaySourceConf; |
| 5 | 6 | import com.lyms.base.common.dao.conf.AssayCustomerConfMapper; |
| 6 | 7 | import com.lyms.base.common.service.conf.AssayCustomerConfService; |
| 8 | +import com.lyms.base.common.service.conf.AssaySourceConfService; | |
| 9 | +import com.lyms.base.common.service.conf.AssaySourceService; | |
| 7 | 10 | import com.lyms.util.StrUtils; |
| 8 | 11 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| 12 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | 13 | import org.springframework.stereotype.Service; |
| 10 | 14 | import java.io.Serializable; |
| 11 | 15 | import java.util.List; |
| ... | ... | @@ -20,6 +24,9 @@ |
| 20 | 24 | */ |
| 21 | 25 | @Service |
| 22 | 26 | public class AssayCustomerConfServiceImpl extends ServiceImpl<AssayCustomerConfMapper, AssayCustomerConf> implements AssayCustomerConfService { |
| 27 | + | |
| 28 | + @Autowired | |
| 29 | + private AssaySourceConfService assaySourceConfService; | |
| 23 | 30 | |
| 24 | 31 | public Integer deleteLogicById(Serializable id){ |
| 25 | 32 | return baseMapper.deleteLogicById(id); |
| ... | ... | @@ -36,6 +43,24 @@ |
| 36 | 43 | @Override |
| 37 | 44 | public List<AssaySourceConf> getCustomerConf(Serializable orgId) { |
| 38 | 45 | return baseMapper.getCustomerConf(orgId); |
| 46 | + } | |
| 47 | + | |
| 48 | + @Override | |
| 49 | + public boolean insertCustomerConf(AssayCustomerConf assayCustomerConf) { | |
| 50 | + String sourceId = assaySourceConfService.getSourceIdByConfId(assayCustomerConf.getConfId()); | |
| 51 | + if(StrUtils.isNotEmpty(sourceId)){ | |
| 52 | + assayCustomerConf.setSourceId(sourceId); | |
| 53 | + } | |
| 54 | + return baseMapper.insert(assayCustomerConf) > 0 ; | |
| 55 | + } | |
| 56 | + | |
| 57 | + @Override | |
| 58 | + public boolean updateCustomerConf(AssayCustomerConf assayCustomerConf) { | |
| 59 | + String sourceId = assaySourceConfService.getSourceIdByConfId(assayCustomerConf.getConfId()); | |
| 60 | + if(StrUtils.isNotEmpty(sourceId)){ | |
| 61 | + assayCustomerConf.setSourceId(sourceId); | |
| 62 | + } | |
| 63 | + return baseMapper.updateById(assayCustomerConf) > 0 ; | |
| 39 | 64 | } |
| 40 | 65 | } |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/AssaySourceConfServiceImpl.java
View file @
1dd81c9
| 1 | 1 | package com.lyms.base.common.service.conf.impl; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.mapper.EntityWrapper; | |
| 3 | 4 | import com.lyms.base.common.entity.conf.AssaySource; |
| 4 | 5 | import com.lyms.base.common.entity.conf.AssaySourceConf; |
| 5 | 6 | import com.lyms.base.common.dao.conf.AssaySourceConfMapper; |
| 6 | 7 | import com.lyms.base.common.service.conf.AssaySourceConfService; |
| 7 | 8 | import com.lyms.util.StrUtils; |
| 8 | 9 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| 10 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | 11 | import org.springframework.stereotype.Service; |
| 10 | 12 | import java.io.Serializable; |
| 13 | +import java.util.List; | |
| 11 | 14 | |
| 12 | 15 | /** |
| 13 | 16 | * <p> |
| 14 | 17 | |
| 15 | 18 | |
| ... | ... | @@ -19,16 +22,32 @@ |
| 19 | 22 | */ |
| 20 | 23 | @Service |
| 21 | 24 | public class AssaySourceConfServiceImpl extends ServiceImpl<AssaySourceConfMapper, AssaySourceConf> implements AssaySourceConfService { |
| 22 | - | |
| 25 | + | |
| 26 | + | |
| 23 | 27 | public Integer deleteLogicById(Serializable id){ |
| 24 | 28 | return baseMapper.deleteLogicById(id); |
| 25 | 29 | } |
| 26 | - @Override | |
| 30 | + | |
| 31 | + @Override | |
| 32 | + public List<AssaySourceConf> getAllEnableSourceConf() { | |
| 33 | + return baseMapper.getAllEnableSourceConf(); | |
| 34 | + } | |
| 35 | + | |
| 36 | + @Override | |
| 27 | 37 | public boolean insert(AssaySourceConf entity) { |
| 28 | 38 | if(StrUtils.isEmpty(entity.getId())){ |
| 29 | 39 | entity.setId(StrUtils.uuid()); |
| 30 | 40 | } |
| 31 | 41 | return super.insert(entity); |
| 42 | + } | |
| 43 | + | |
| 44 | + @Override | |
| 45 | + public String getSourceIdByConfId(String confId){ | |
| 46 | + AssaySourceConf assaySourceConf = baseMapper.selectById(confId); | |
| 47 | + if(assaySourceConf != null){ | |
| 48 | + return assaySourceConf.getSourceId(); | |
| 49 | + } | |
| 50 | + return null; | |
| 32 | 51 | } |
| 33 | 52 | } |
parent/base.common/src/main/java/com/lyms/base/common/service/conf/impl/AssaySourceServiceImpl.java
View file @
1dd81c9
| 1 | 1 | package com.lyms.base.common.service.conf.impl; |
| 2 | 2 | |
| 3 | +import com.baomidou.mybatisplus.mapper.EntityWrapper; | |
| 3 | 4 | import com.lyms.base.common.entity.conf.AssaySource; |
| 4 | 5 | import com.lyms.base.common.dao.conf.AssaySourceMapper; |
| 5 | 6 | import com.lyms.base.common.service.conf.AssaySourceService; |
| ... | ... | @@ -7,6 +8,7 @@ |
| 7 | 8 | import com.baomidou.mybatisplus.service.impl.ServiceImpl; |
| 8 | 9 | import org.springframework.stereotype.Service; |
| 9 | 10 | import java.io.Serializable; |
| 11 | +import java.util.List; | |
| 10 | 12 | |
| 11 | 13 | /** |
| 12 | 14 | * <p> |
| ... | ... | @@ -22,7 +24,12 @@ |
| 22 | 24 | public Integer deleteLogicById(Serializable id){ |
| 23 | 25 | return baseMapper.deleteLogicById(id); |
| 24 | 26 | } |
| 25 | - | |
| 27 | + | |
| 28 | + @Override | |
| 29 | + public List<AssaySource> getAllSource() { | |
| 30 | + return baseMapper.selectList(new EntityWrapper<AssaySource>().where("IFDEL=0")); | |
| 31 | + } | |
| 32 | + | |
| 26 | 33 | @Override |
| 27 | 34 | public boolean insert(AssaySource entity) { |
| 28 | 35 | if(StrUtils.isEmpty(entity.getId())){ |
parent/center.manager/src/main/java/com/lyms/cm/controller/conf/AssayCustomerConfController.java
View file @
1dd81c9
| 1 | 1 | package com.lyms.cm.controller.conf; |
| 2 | 2 | |
| 3 | +import java.util.List; | |
| 3 | 4 | import java.util.Map; |
| 4 | 5 | |
| 6 | +import com.lyms.base.common.entity.organ.Organizations; | |
| 7 | +import com.lyms.base.common.service.conf.AssaySourceService; | |
| 8 | +import com.lyms.base.common.service.organ.OrganizationsService; | |
| 5 | 9 | import org.apache.commons.lang3.StringUtils; |
| 6 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | 11 | import org.springframework.stereotype.Controller; |
| ... | ... | @@ -36,6 +40,13 @@ |
| 36 | 40 | public class AssayCustomerConfController extends BaseController { |
| 37 | 41 | @Autowired |
| 38 | 42 | private AssayCustomerConfService assayCustomerConfService; |
| 43 | + @Autowired | |
| 44 | + private OrganizationsService organizationsService; | |
| 45 | + @Autowired | |
| 46 | + private AssaySourceService assaySourceService; | |
| 47 | + @Autowired | |
| 48 | + private AssaySourceConfService assaySourceConfService; | |
| 49 | + | |
| 39 | 50 | |
| 40 | 51 | |
| 41 | 52 | /** |
| 42 | 53 | |
| ... | ... | @@ -44,14 +55,15 @@ |
| 44 | 55 | * @return |
| 45 | 56 | */ |
| 46 | 57 | @RequestMapping(value = "/toList", method = { RequestMethod.GET }) |
| 47 | - public String toList() { | |
| 48 | - return "/conf/assay/customer_list"; | |
| 58 | + public String toList(Model model) { | |
| 59 | + List<Organizations> orgs = organizationsService.getAllEnableOrg(); | |
| 60 | + model.addAttribute("orgs",orgs); | |
| 61 | + return "/conf/assay/customer_list"; | |
| 49 | 62 | } |
| 50 | 63 | |
| 51 | 64 | /** |
| 52 | 65 | * 列表 |
| 53 | 66 | * |
| 54 | - * @param page | |
| 55 | 67 | * @param model |
| 56 | 68 | * @return |
| 57 | 69 | */ |
| 58 | 70 | |
| ... | ... | @@ -61,9 +73,13 @@ |
| 61 | 73 | Page<AssayCustomerConf> page = getPage(); |
| 62 | 74 | EntityWrapper<AssayCustomerConf> ew = new EntityWrapper<AssayCustomerConf>(); |
| 63 | 75 | String searchName = getParameter("name"); |
| 76 | + String orgId = getParameter("orgId"); | |
| 64 | 77 | if (StrUtils.isNotEmpty(searchName)) { |
| 65 | 78 | ew.and("source_Id like {0}", searchName.trim() + "%"); |
| 66 | 79 | } |
| 80 | + if (StrUtils.isNotEmpty(orgId)) { | |
| 81 | + ew.and("orgId = {0}", orgId.trim()); | |
| 82 | + } | |
| 67 | 83 | page = assayCustomerConfService.selectPage(page,ew); |
| 68 | 84 | return toGridData(page); |
| 69 | 85 | } |
| ... | ... | @@ -79,6 +95,10 @@ |
| 79 | 95 | AssayCustomerConf entity = assayCustomerConfService.selectById(id); |
| 80 | 96 | model.addAttribute("conf", entity); |
| 81 | 97 | } |
| 98 | + List<Organizations> orgs = organizationsService.getAllEnableOrg(); | |
| 99 | + model.addAttribute("orgs",orgs); | |
| 100 | + List<AssaySourceConf> confList = assaySourceConfService.getAllEnableSourceConf(); | |
| 101 | + model.addAttribute("confList",confList); | |
| 82 | 102 | return "/conf/assay/customer_edit"; |
| 83 | 103 | } |
| 84 | 104 | |
| 85 | 105 | |
| ... | ... | @@ -87,13 +107,12 @@ |
| 87 | 107 | * <p> |
| 88 | 108 | * TODO |
| 89 | 109 | * |
| 90 | - * @param user | |
| 91 | 110 | * @return |
| 92 | 111 | */ |
| 93 | 112 | @RequestMapping(value = "/create", method = RequestMethod.POST) |
| 94 | 113 | @ResponseBody |
| 95 | 114 | public AjaxResult create(AssayCustomerConf AssayCustomerConf, AjaxResult ajaxResult) { |
| 96 | - boolean tag = assayCustomerConfService.insert(AssayCustomerConf); | |
| 115 | + boolean tag = assayCustomerConfService.insertCustomerConf(AssayCustomerConf); | |
| 97 | 116 | return handleAjaxResult(ajaxResult, tag, OperationName.CREATE); |
| 98 | 117 | } |
| 99 | 118 | |
| ... | ... | @@ -103,7 +122,7 @@ |
| 103 | 122 | @RequestMapping(value = "/update", method = { RequestMethod.POST }) |
| 104 | 123 | @ResponseBody |
| 105 | 124 | public AjaxResult update(AssayCustomerConf AssayCustomerConf, AjaxResult ajaxResult) { |
| 106 | - boolean tag = assayCustomerConfService.updateById(AssayCustomerConf); | |
| 125 | + boolean tag = assayCustomerConfService.updateCustomerConf(AssayCustomerConf); | |
| 107 | 126 | return handleAjaxResult(ajaxResult, tag, OperationName.UPDATE); |
| 108 | 127 | } |
| 109 | 128 |
parent/center.manager/src/main/java/com/lyms/cm/controller/conf/AssaySourceConfController.java
View file @
1dd81c9
| 1 | 1 | package com.lyms.cm.controller.conf; |
| 2 | 2 | |
| 3 | +import java.util.List; | |
| 3 | 4 | import java.util.Map; |
| 4 | 5 | |
| 6 | +import com.lyms.base.common.entity.conf.AssaySource; | |
| 7 | +import com.lyms.base.common.service.conf.AssaySourceService; | |
| 5 | 8 | import org.apache.commons.lang3.StringUtils; |
| 6 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | 10 | import org.springframework.stereotype.Controller; |
| ... | ... | @@ -34,6 +37,11 @@ |
| 34 | 37 | |
| 35 | 38 | @Autowired |
| 36 | 39 | private AssaySourceConfService assaySourceConfService; |
| 40 | + | |
| 41 | + @Autowired | |
| 42 | + private AssaySourceService assaySourceService; | |
| 43 | + | |
| 44 | + | |
| 37 | 45 | |
| 38 | 46 | |
| 39 | 47 | /** |
| ... | ... | @@ -49,7 +57,6 @@ |
| 49 | 57 | /** |
| 50 | 58 | * 列表 |
| 51 | 59 | * |
| 52 | - * @param page | |
| 53 | 60 | * @param model |
| 54 | 61 | * @return |
| 55 | 62 | */ |
| 56 | 63 | |
| 57 | 64 | |
| ... | ... | @@ -77,15 +84,16 @@ |
| 77 | 84 | AssaySourceConf entity = assaySourceConfService.selectById(id); |
| 78 | 85 | model.addAttribute("conf", entity); |
| 79 | 86 | } |
| 87 | + List<AssaySource> sourceList = assaySourceService.getAllSource(); | |
| 88 | + model.addAttribute("sourceList",sourceList); | |
| 80 | 89 | return "/conf/assay/conf_edit"; |
| 81 | 90 | } |
| 82 | 91 | |
| 83 | 92 | /** |
| 84 | - * 创建用户 | |
| 93 | + * 创建 | |
| 85 | 94 | * <p> |
| 86 | 95 | * TODO |
| 87 | 96 | * |
| 88 | - * @param user | |
| 89 | 97 | * @return |
| 90 | 98 | */ |
| 91 | 99 | @RequestMapping(value = "/create", method = RequestMethod.POST) |
parent/center.manager/src/main/webapp/WEB-INF/views/conf/assay/conf_edit.html
View file @
1dd81c9
| ... | ... | @@ -9,9 +9,9 @@ |
| 9 | 9 | </div> |
| 10 | 10 | </div> |
| 11 | 11 | <div class="form-group"> |
| 12 | - <label class="col-sm-3 control-label">sourceId:</label> | |
| 12 | + <label class="col-sm-3 control-label">基础项:</label> | |
| 13 | 13 | <div class="col-sm-8"> |
| 14 | - <input type="text" placeholder="sourceId" value="$!conf.sourceId" aria-required="true" required="true" class="form-control" minlength="2" name="sourceId" id="sourceId"> | |
| 14 | + #selector("sourceId" "sourceId" $sourceList $!conf.sourceId) | |
| 15 | 15 | </div> |
| 16 | 16 | </div> |
| 17 | 17 | <div class="form-group"> |
parent/center.manager/src/main/webapp/WEB-INF/views/conf/assay/customer_edit.html
View file @
1dd81c9
| ... | ... | @@ -9,21 +9,15 @@ |
| 9 | 9 | </div> |
| 10 | 10 | </div> |
| 11 | 11 | <div class="form-group"> |
| 12 | - <label class="col-sm-3 control-label">confId:</label> | |
| 12 | + <label class="col-sm-3 control-label">化验项配置:</label> | |
| 13 | 13 | <div class="col-sm-8"> |
| 14 | - <input type="text" placeholder="confId" value="$!conf.confId" class="form-control" minlength="2" name="confId" id="confId"> | |
| 14 | + #selector("confId" "confId" $confList $!conf.confId ) | |
| 15 | 15 | </div> |
| 16 | 16 | </div> |
| 17 | 17 | <div class="form-group"> |
| 18 | - <label class="col-sm-3 control-label">机构ID:</label> | |
| 18 | + <label class="col-sm-3 control-label">机构:</label> | |
| 19 | 19 | <div class="col-sm-8"> |
| 20 | - <input type="text" placeholder="机构ID" value="$!conf.orgId" class="form-control" minlength="2" name="orgId" id="orgId"> | |
| 21 | - </div> | |
| 22 | - </div> | |
| 23 | - <div class="form-group"> | |
| 24 | - <label class="col-sm-3 control-label">sourceId:</label> | |
| 25 | - <div class="col-sm-8"> | |
| 26 | - <input type="text" placeholder="sourceId" value="$!conf.sourceId" aria-required="true" required="true" class="form-control" minlength="2" name="sourceId" id="sourceId"> | |
| 20 | + #selector("orgId" "orgId" $orgs $!conf.orgId ) | |
| 27 | 21 | </div> |
| 28 | 22 | </div> |
| 29 | 23 | <div class="form-group"> |
parent/center.manager/src/main/webapp/WEB-INF/views/conf/assay/customer_list.html
View file @
1dd81c9
| ... | ... | @@ -6,6 +6,10 @@ |
| 6 | 6 | <div class="form-group"> |
| 7 | 7 | <input type="text" placeholder="请输入sourceId" id="nameSearch" class="form-control"> |
| 8 | 8 | </div> |
| 9 | + <div class="form-group"> | |
| 10 | + 医院: | |
| 11 | + #selector("searchOrgId" "searchOrgId" $orgs ) | |
| 12 | + </div> | |
| 9 | 13 | </form> |
| 10 | 14 | </div> |
| 11 | 15 | </div> |
| ... | ... | @@ -33,7 +37,8 @@ |
| 33 | 37 | function search(){ |
| 34 | 38 | var queryParams = { |
| 35 | 39 | query:{ |
| 36 | - name: $("#nameSearch").val() | |
| 40 | + name: $("#nameSearch").val(), | |
| 41 | + orgId: $("#searchOrgId").val() | |
| 37 | 42 | } |
| 38 | 43 | } |
| 39 | 44 | $('#dataTable').bootstrapTable('refresh', queryParams ); |