Commit 8d3da07432d4815bb9aa299f86b1e5a380526fc9
1 parent
169ebc1af5
Exists in
master
and in
6 other branches
医院功能模块配置
Showing 10 changed files with 505 additions and 6 deletions
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/ModularFunctionConfigDao.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/ModularFunctionConfigImpl.java
- platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/ModularFunctionConfigService.java
- platform-dal/src/main/java/com/lyms/platform/pojo/ModularFunctionConfigModel.java
- platform-dal/src/main/java/com/lyms/platform/query/ModularFunctionConfigQuery.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ModularFunctionConfigController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SmsConfigController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ModularFunctionConfigFacde.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ModularFunctionConfigRequest.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ModularFunctionConfigResult.java
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/ModularFunctionConfigDao.java
View file @
8d3da07
| 1 | +package com.lyms.platform.biz.dal; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 4 | +import com.lyms.platform.pojo.ModularFunctionConfigModel; | |
| 5 | + | |
| 6 | +import java.util.List; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Created by riecard on 2016/10/19. | |
| 10 | + */ | |
| 11 | +public interface ModularFunctionConfigDao { | |
| 12 | + List<ModularFunctionConfigModel> queryDiagnoseConfigs(MongoQuery query); | |
| 13 | + ModularFunctionConfigModel saveDiagnoseConfig(ModularFunctionConfigModel data); | |
| 14 | + void updateDiagnoseConfig(ModularFunctionConfigModel data); | |
| 15 | + int queryDiagnoseConfigCount(MongoQuery mongoQuery); | |
| 16 | + ModularFunctionConfigModel findById(String id); | |
| 17 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/dal/impl/ModularFunctionConfigImpl.java
View file @
8d3da07
| 1 | +package com.lyms.platform.biz.dal.impl; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.ModularFunctionConfigDao; | |
| 4 | +import com.lyms.platform.common.dao.BaseMongoDAOImpl; | |
| 5 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 8 | +import com.lyms.platform.pojo.ModularFunctionConfigModel; | |
| 9 | +import org.springframework.stereotype.Repository; | |
| 10 | + | |
| 11 | +import java.util.Date; | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +/** | |
| 15 | + * 诊断配置 | |
| 16 | + * Created by Administrator on 2017/1/13 0013. | |
| 17 | + */ | |
| 18 | +@Repository("modularFunctionConfigDao") | |
| 19 | +public class ModularFunctionConfigImpl extends BaseMongoDAOImpl<ModularFunctionConfigModel> implements ModularFunctionConfigDao { | |
| 20 | + | |
| 21 | + @Override | |
| 22 | + public List<ModularFunctionConfigModel> queryDiagnoseConfigs(MongoQuery query) { | |
| 23 | + return find(query.convertToMongoQuery()); | |
| 24 | + } | |
| 25 | + | |
| 26 | + @Override | |
| 27 | + public ModularFunctionConfigModel saveDiagnoseConfig(ModularFunctionConfigModel data) { | |
| 28 | + data.setCreated(new Date()); | |
| 29 | + data.setModified(new Date()); | |
| 30 | + return save(data); | |
| 31 | + } | |
| 32 | + | |
| 33 | + @Override | |
| 34 | + public void updateDiagnoseConfig(ModularFunctionConfigModel data) { | |
| 35 | + data.setModified(new Date()); | |
| 36 | + update(new MongoQuery(new MongoCondition("id", data.getId(), MongoOper.IS)).convertToMongoQuery(), data); | |
| 37 | + } | |
| 38 | + | |
| 39 | + @Override | |
| 40 | + public int queryDiagnoseConfigCount(MongoQuery mongoQuery) { | |
| 41 | + return (int)count(mongoQuery.convertToMongoQuery()); | |
| 42 | + } | |
| 43 | + @Override | |
| 44 | + public ModularFunctionConfigModel findById(String id) { | |
| 45 | + return super.findById(id); | |
| 46 | + } | |
| 47 | +} |
platform-biz-patient-service/src/main/java/com/lyms/platform/biz/service/ModularFunctionConfigService.java
View file @
8d3da07
| 1 | +package com.lyms.platform.biz.service; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.dal.ModularFunctionConfigDao; | |
| 4 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 5 | +import com.lyms.platform.pojo.ModularFunctionConfigModel; | |
| 6 | +import com.lyms.platform.query.ModularFunctionConfigQuery; | |
| 7 | +import org.apache.commons.lang.StringUtils; | |
| 8 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 9 | +import org.springframework.data.domain.Sort.Direction; | |
| 10 | +import org.springframework.stereotype.Service; | |
| 11 | + | |
| 12 | +import java.util.List; | |
| 13 | + | |
| 14 | +@Service | |
| 15 | +public class ModularFunctionConfigService { | |
| 16 | + | |
| 17 | + @Autowired | |
| 18 | + private ModularFunctionConfigDao modularFunctionConfigDao; | |
| 19 | + | |
| 20 | + | |
| 21 | + public List<ModularFunctionConfigModel> queryDiagnoseConfigs(ModularFunctionConfigQuery modularFunctionConfigQuery){ | |
| 22 | + MongoQuery query = modularFunctionConfigQuery.convertToQuery(); | |
| 23 | + if (StringUtils.isNotEmpty(modularFunctionConfigQuery.getNeed())) { | |
| 24 | + modularFunctionConfigQuery.mysqlBuild(modularFunctionConfigDao.queryDiagnoseConfigCount(modularFunctionConfigQuery.convertToQuery())); | |
| 25 | + query.start(modularFunctionConfigQuery.getOffset()).end(modularFunctionConfigQuery.getLimit()); | |
| 26 | + } | |
| 27 | + return modularFunctionConfigDao.queryDiagnoseConfigs(query.addOrder(Direction.DESC, "created")); | |
| 28 | + } | |
| 29 | + public ModularFunctionConfigModel saveDiagnoseConfig(ModularFunctionConfigModel data){ | |
| 30 | + return modularFunctionConfigDao.saveDiagnoseConfig(data); | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void updateDiagnoseConfig(ModularFunctionConfigModel data){ | |
| 34 | + modularFunctionConfigDao.updateDiagnoseConfig(data); | |
| 35 | + } | |
| 36 | + public ModularFunctionConfigModel findById(String id){ | |
| 37 | + return modularFunctionConfigDao.findById(id); | |
| 38 | + } | |
| 39 | + | |
| 40 | +} |
platform-dal/src/main/java/com/lyms/platform/pojo/ModularFunctionConfigModel.java
View file @
8d3da07
| 1 | +package com.lyms.platform.pojo; | |
| 2 | + | |
| 3 | +import com.lyms.platform.beans.SerialIdEnum; | |
| 4 | +import com.lyms.platform.common.result.BaseModel; | |
| 5 | +import org.springframework.data.mongodb.core.mapping.Document; | |
| 6 | + | |
| 7 | +import java.util.Date; | |
| 8 | +import java.util.Map; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * 医院功能模块配置 | |
| 12 | + * Created by Administrator on 2018-03-29. | |
| 13 | + */ | |
| 14 | +@Document(collection = "lyms_modular_function_config") | |
| 15 | +public class ModularFunctionConfigModel extends BaseModel { | |
| 16 | + | |
| 17 | + private static final long serialVersionUID = SerialIdEnum.DiagnoseConfigModel.getCid(); | |
| 18 | + | |
| 19 | + private String id; | |
| 20 | + private String hospitalId; | |
| 21 | + //是否启用 0停用 1启用 | |
| 22 | + private String enable; | |
| 23 | + //功能模块的配置详情 | |
| 24 | + private Map<String,Object> configs; | |
| 25 | + private Date created; | |
| 26 | + private Date modified; | |
| 27 | + | |
| 28 | + | |
| 29 | + public Date getCreated() { | |
| 30 | + return created; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setCreated(Date created) { | |
| 34 | + this.created = created; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public Date getModified() { | |
| 38 | + return modified; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setModified(Date modified) { | |
| 42 | + this.modified = modified; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public String getId() { | |
| 46 | + return id; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void setId(String id) { | |
| 50 | + this.id = id; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public String getHospitalId() { | |
| 54 | + return hospitalId; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void setHospitalId(String hospitalId) { | |
| 58 | + this.hospitalId = hospitalId; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public String getEnable() { | |
| 62 | + return enable; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void setEnable(String enable) { | |
| 66 | + this.enable = enable; | |
| 67 | + } | |
| 68 | + | |
| 69 | + public Map<String, Object> getConfigs() { | |
| 70 | + return configs; | |
| 71 | + } | |
| 72 | + | |
| 73 | + public void setConfigs(Map<String, Object> configs) { | |
| 74 | + this.configs = configs; | |
| 75 | + } | |
| 76 | +} |
platform-dal/src/main/java/com/lyms/platform/query/ModularFunctionConfigQuery.java
View file @
8d3da07
| 1 | +package com.lyms.platform.query; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.lyms.platform.common.base.IConvertToNativeQuery; | |
| 5 | +import com.lyms.platform.common.dao.BaseQuery; | |
| 6 | +import com.lyms.platform.common.dao.operator.MongoCondition; | |
| 7 | +import com.lyms.platform.common.dao.operator.MongoOper; | |
| 8 | +import com.lyms.platform.common.dao.operator.MongoQuery; | |
| 9 | +import org.springframework.data.mongodb.core.query.Criteria; | |
| 10 | + | |
| 11 | +/** | |
| 12 | + * Created by Administrator on 2018-01-09. | |
| 13 | + */ | |
| 14 | +public class ModularFunctionConfigQuery extends BaseQuery implements IConvertToNativeQuery { | |
| 15 | + | |
| 16 | + private String id; | |
| 17 | + private String hospitalId; | |
| 18 | + //是否启用 0停用 1启用 | |
| 19 | + private Integer enable; | |
| 20 | + | |
| 21 | + @Override | |
| 22 | + public MongoQuery convertToQuery() { | |
| 23 | + MongoCondition condition = MongoCondition.newInstance(); | |
| 24 | + if (null != id) { | |
| 25 | + condition = condition.and("id", id, MongoOper.IS); | |
| 26 | + } | |
| 27 | + | |
| 28 | + | |
| 29 | + if (null != hospitalId) { | |
| 30 | + condition = condition.and("hospitalId", hospitalId, MongoOper.IS); | |
| 31 | + } | |
| 32 | + | |
| 33 | + if (null != enable) { | |
| 34 | + condition = condition.and("enable", enable, MongoOper.IS); | |
| 35 | + } | |
| 36 | + | |
| 37 | + Criteria c1 = null; | |
| 38 | + | |
| 39 | + if (null != c1) { | |
| 40 | + condition = condition.andCondition(new MongoCondition(c1)); | |
| 41 | + } | |
| 42 | + return condition.toMongoQuery(); | |
| 43 | + } | |
| 44 | + | |
| 45 | + public String getId() { | |
| 46 | + return id; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void setId(String id) { | |
| 50 | + this.id = id; | |
| 51 | + } | |
| 52 | + | |
| 53 | + public Integer getEnable() { | |
| 54 | + return enable; | |
| 55 | + } | |
| 56 | + | |
| 57 | + public void setEnable(Integer enable) { | |
| 58 | + this.enable = enable; | |
| 59 | + } | |
| 60 | + | |
| 61 | + public String getHospitalId() { | |
| 62 | + return hospitalId; | |
| 63 | + } | |
| 64 | + | |
| 65 | + public void setHospitalId(String hospitalId) { | |
| 66 | + this.hospitalId = hospitalId; | |
| 67 | + } | |
| 68 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/ModularFunctionConfigController.java
View file @
8d3da07
| 1 | +package com.lyms.platform.operate.web.controller; | |
| 2 | + | |
| 3 | + | |
| 4 | +import com.lyms.platform.common.annotation.TokenRequired; | |
| 5 | +import com.lyms.platform.common.base.BaseController; | |
| 6 | +import com.lyms.platform.common.result.BaseResponse; | |
| 7 | +import com.lyms.platform.operate.web.facade.ModularFunctionConfigFacde; | |
| 8 | +import com.lyms.platform.operate.web.request.ModularFunctionConfigRequest; | |
| 9 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 10 | +import org.springframework.stereotype.Controller; | |
| 11 | +import org.springframework.web.bind.annotation.*; | |
| 12 | + | |
| 13 | +import javax.servlet.http.HttpServletRequest; | |
| 14 | + | |
| 15 | + | |
| 16 | +/** | |
| 17 | + * 医院功能模块配置 | |
| 18 | + */ | |
| 19 | +@Controller | |
| 20 | +public class ModularFunctionConfigController extends BaseController { | |
| 21 | + | |
| 22 | + @Autowired | |
| 23 | + private ModularFunctionConfigFacde modularFunctionConfigFacde; | |
| 24 | + | |
| 25 | + /** | |
| 26 | + * 配置医院功能模块 | |
| 27 | + * @param model | |
| 28 | + * @param request | |
| 29 | + * @return | |
| 30 | + */ | |
| 31 | + @RequestMapping(method = RequestMethod.POST, value = "/addModularFunConfig") | |
| 32 | + @ResponseBody | |
| 33 | + @TokenRequired | |
| 34 | + public BaseResponse addModularFunConfig(@RequestBody ModularFunctionConfigRequest model, | |
| 35 | + HttpServletRequest request) { | |
| 36 | + | |
| 37 | + return modularFunctionConfigFacde.addDiagnoseConfig(model, getUserId(request)); | |
| 38 | + } | |
| 39 | + | |
| 40 | + | |
| 41 | + /** | |
| 42 | + * 查询当前医院的功能配置项 | |
| 43 | + * @param hospitalId | |
| 44 | + * @param request | |
| 45 | + * @return | |
| 46 | + */ | |
| 47 | + @RequestMapping(method = RequestMethod.GET, value = "/queryModularFunConfig") | |
| 48 | + @ResponseBody | |
| 49 | + @TokenRequired | |
| 50 | + public BaseResponse queryDiagnoseConfig(@RequestParam("hospitalId")String hospitalId, | |
| 51 | + HttpServletRequest request) { | |
| 52 | + | |
| 53 | + return modularFunctionConfigFacde.queryDiagnoseConfig(hospitalId, getUserId(request)); | |
| 54 | + } | |
| 55 | + | |
| 56 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/SmsConfigController.java
View file @
8d3da07
| ... | ... | @@ -9,24 +9,18 @@ |
| 9 | 9 | import com.lyms.platform.common.result.BaseObjectResponse; |
| 10 | 10 | import com.lyms.platform.common.result.BaseResponse; |
| 11 | 11 | import com.lyms.platform.common.utils.DateUtil; |
| 12 | -import com.lyms.platform.common.utils.ExceptionUtils; | |
| 13 | -import com.lyms.platform.common.utils.JsonUtil; | |
| 14 | 12 | import com.lyms.platform.common.utils.StringUtils; |
| 15 | 13 | import com.lyms.platform.operate.web.facade.SmsConfigFacade; |
| 16 | 14 | import com.lyms.platform.operate.web.request.MessageListRequest; |
| 17 | 15 | import com.lyms.platform.operate.web.request.MessageRequest; |
| 18 | 16 | import com.lyms.platform.operate.web.request.SmsConfigRequest; |
| 19 | -import com.lyms.platform.operate.web.utils.MessageCenterService; | |
| 20 | 17 | import com.lyms.platform.pojo.BabyModel; |
| 21 | -import com.lyms.platform.pojo.Patients; | |
| 22 | 18 | import com.lyms.platform.pojo.SmsConfigModel; |
| 23 | 19 | import com.lyms.platform.pojo.SmsTemplateModel; |
| 24 | 20 | import com.lyms.platform.query.BabyModelQuery; |
| 25 | -import com.lyms.platform.query.PatientsQuery; | |
| 26 | 21 | import com.lyms.platform.query.SmsTemplateQuery; |
| 27 | 22 | import org.apache.commons.collections.CollectionUtils; |
| 28 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
| 29 | -import org.springframework.data.mongodb.core.query.Query; | |
| 30 | 24 | import org.springframework.stereotype.Controller; |
| 31 | 25 | import org.springframework.web.bind.annotation.*; |
| 32 | 26 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/ModularFunctionConfigFacde.java
View file @
8d3da07
| 1 | +package com.lyms.platform.operate.web.facade; | |
| 2 | + | |
| 3 | +import com.lyms.platform.biz.service.BasicConfigService; | |
| 4 | +import com.lyms.platform.biz.service.ModularFunctionConfigService; | |
| 5 | +import com.lyms.platform.common.constants.ErrorCodeConstants; | |
| 6 | +import com.lyms.platform.common.enums.OptActionEnums; | |
| 7 | +import com.lyms.platform.common.result.BaseObjectResponse; | |
| 8 | +import com.lyms.platform.common.result.BaseResponse; | |
| 9 | +import com.lyms.platform.common.utils.StringUtils; | |
| 10 | +import com.lyms.platform.operate.web.request.ModularFunctionConfigRequest; | |
| 11 | +import com.lyms.platform.operate.web.result.ModularFunctionConfigResult; | |
| 12 | +import com.lyms.platform.pojo.ModularFunctionConfigModel; | |
| 13 | +import com.lyms.platform.query.ModularFunctionConfigQuery; | |
| 14 | +import org.apache.commons.collections.CollectionUtils; | |
| 15 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 16 | +import org.springframework.stereotype.Component; | |
| 17 | + | |
| 18 | +import java.util.List; | |
| 19 | + | |
| 20 | +/** | |
| 21 | + * Created by Administrator on 2018-03-29. | |
| 22 | + */ | |
| 23 | +@Component | |
| 24 | +public class ModularFunctionConfigFacde { | |
| 25 | + | |
| 26 | + @Autowired | |
| 27 | + private ModularFunctionConfigService modularFunctionConfigServcie; | |
| 28 | + | |
| 29 | + @Autowired | |
| 30 | + private AutoMatchFacade autoMatchFacade; | |
| 31 | + | |
| 32 | + @Autowired | |
| 33 | + private OperateLogFacade operateLogFacade; | |
| 34 | + | |
| 35 | + @Autowired | |
| 36 | + private BasicConfigService basicConfigService; | |
| 37 | + | |
| 38 | + /** | |
| 39 | + * 添加配置基础和项 | |
| 40 | + * | |
| 41 | + * @param request | |
| 42 | + * @param userId | |
| 43 | + * @return | |
| 44 | + */ | |
| 45 | + public BaseResponse addDiagnoseConfig(ModularFunctionConfigRequest request, Integer userId) { | |
| 46 | + | |
| 47 | + String hospitalId = autoMatchFacade.getHospitalId(userId); | |
| 48 | + ModularFunctionConfigModel modularFunctionConfigModel = request.convertToDataModel(); | |
| 49 | + if (StringUtils.isNotEmpty(request.getId())) { | |
| 50 | + ModularFunctionConfigModel operateBeforeContent = modularFunctionConfigServcie.findById(request.getId()); | |
| 51 | + modularFunctionConfigServcie.updateDiagnoseConfig(modularFunctionConfigModel); | |
| 52 | + operateLogFacade.addModifyOptLog(userId, Integer.parseInt(hospitalId),operateBeforeContent, modularFunctionConfigModel, OptActionEnums.UPDATE.getId(), "配置医院功能模块"); | |
| 53 | + } else { | |
| 54 | + modularFunctionConfigModel = modularFunctionConfigServcie.saveDiagnoseConfig(modularFunctionConfigModel); | |
| 55 | + operateLogFacade.addAddOptLog(userId, Integer.parseInt(hospitalId), modularFunctionConfigModel, OptActionEnums.ADD.getId(), "配置医院功能模块"); | |
| 56 | + } | |
| 57 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg(ErrorCodeConstants.SUCCESS_DESCRIPTION); | |
| 58 | + } | |
| 59 | + | |
| 60 | + public BaseResponse queryDiagnoseConfig(String hospitalId, Integer userId) { | |
| 61 | + | |
| 62 | + ModularFunctionConfigQuery diagnoseConfigQuery = new ModularFunctionConfigQuery(); | |
| 63 | + diagnoseConfigQuery.setHospitalId(hospitalId); | |
| 64 | + List<ModularFunctionConfigModel> configModels = modularFunctionConfigServcie.queryDiagnoseConfigs(diagnoseConfigQuery); | |
| 65 | + if (CollectionUtils.isEmpty(configModels)) | |
| 66 | + { | |
| 67 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有数据"); | |
| 68 | + } | |
| 69 | + | |
| 70 | + ModularFunctionConfigModel configModel = configModels.get(0); | |
| 71 | + if (configModel != null) | |
| 72 | + { | |
| 73 | + ModularFunctionConfigResult result = new ModularFunctionConfigResult(); | |
| 74 | + result.convertToResult(configModel); | |
| 75 | + return new BaseObjectResponse().setErrorcode(ErrorCodeConstants.SUCCESS).setErrormsg("成功").setData(result); | |
| 76 | + } | |
| 77 | + return new BaseResponse().setErrorcode(ErrorCodeConstants.NO_DATA).setErrormsg("没有数据"); | |
| 78 | + } | |
| 79 | + | |
| 80 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/request/ModularFunctionConfigRequest.java
View file @
8d3da07
| 1 | +package com.lyms.platform.operate.web.request; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.base.IBasicRequestConvert; | |
| 4 | +import com.lyms.platform.pojo.ModularFunctionConfigModel; | |
| 5 | + | |
| 6 | +import java.util.Map; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Created by Administrator on 2018-03-29. | |
| 10 | + */ | |
| 11 | +public class ModularFunctionConfigRequest implements IBasicRequestConvert<ModularFunctionConfigModel> { | |
| 12 | + | |
| 13 | + private String id; | |
| 14 | + private String hospitalId; | |
| 15 | + //是否启用 0停用 1启用 | |
| 16 | + private String enable; | |
| 17 | + private Map<String,Object> configs; | |
| 18 | + | |
| 19 | + public String getId() { | |
| 20 | + return id; | |
| 21 | + } | |
| 22 | + | |
| 23 | + public void setId(String id) { | |
| 24 | + this.id = id; | |
| 25 | + } | |
| 26 | + | |
| 27 | + public String getHospitalId() { | |
| 28 | + return hospitalId; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public void setHospitalId(String hospitalId) { | |
| 32 | + this.hospitalId = hospitalId; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public String getEnable() { | |
| 36 | + return enable; | |
| 37 | + } | |
| 38 | + | |
| 39 | + public void setEnable(String enable) { | |
| 40 | + this.enable = enable; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public Map<String, Object> getConfigs() { | |
| 44 | + return configs; | |
| 45 | + } | |
| 46 | + | |
| 47 | + public void setConfigs(Map<String, Object> configs) { | |
| 48 | + this.configs = configs; | |
| 49 | + } | |
| 50 | + | |
| 51 | + @Override | |
| 52 | + public ModularFunctionConfigModel convertToDataModel() { | |
| 53 | + ModularFunctionConfigModel model = new ModularFunctionConfigModel(); | |
| 54 | + model.setId(id); | |
| 55 | + model.setConfigs(configs); | |
| 56 | + model.setEnable(enable); | |
| 57 | + model.setHospitalId(hospitalId); | |
| 58 | + return model; | |
| 59 | + } | |
| 60 | +} |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/result/ModularFunctionConfigResult.java
View file @
8d3da07
| 1 | +package com.lyms.platform.operate.web.result; | |
| 2 | + | |
| 3 | +import com.lyms.platform.common.base.IBasicResultConvert; | |
| 4 | +import com.lyms.platform.pojo.ModularFunctionConfigModel; | |
| 5 | + | |
| 6 | +import java.util.Map; | |
| 7 | + | |
| 8 | +/** | |
| 9 | + * Created by Administrator on 2018-03-30. | |
| 10 | + */ | |
| 11 | +public class ModularFunctionConfigResult implements IBasicResultConvert<ModularFunctionConfigResult, ModularFunctionConfigModel> { | |
| 12 | + | |
| 13 | + private String id; | |
| 14 | + private String hospitalId; | |
| 15 | + //是否启用 0停用 1启用 | |
| 16 | + private String enable; | |
| 17 | + private Map<String,Object> configs; | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + public String getId() { | |
| 22 | + return id; | |
| 23 | + } | |
| 24 | + | |
| 25 | + public void setId(String id) { | |
| 26 | + this.id = id; | |
| 27 | + } | |
| 28 | + | |
| 29 | + public String getHospitalId() { | |
| 30 | + return hospitalId; | |
| 31 | + } | |
| 32 | + | |
| 33 | + public void setHospitalId(String hospitalId) { | |
| 34 | + this.hospitalId = hospitalId; | |
| 35 | + } | |
| 36 | + | |
| 37 | + public String getEnable() { | |
| 38 | + return enable; | |
| 39 | + } | |
| 40 | + | |
| 41 | + public void setEnable(String enable) { | |
| 42 | + this.enable = enable; | |
| 43 | + } | |
| 44 | + | |
| 45 | + public Map<String, Object> getConfigs() { | |
| 46 | + return configs; | |
| 47 | + } | |
| 48 | + | |
| 49 | + public void setConfigs(Map<String, Object> configs) { | |
| 50 | + this.configs = configs; | |
| 51 | + } | |
| 52 | + | |
| 53 | + @Override | |
| 54 | + public ModularFunctionConfigResult convertToResult(ModularFunctionConfigModel model) { | |
| 55 | + setId(model.getId()); | |
| 56 | + setHospitalId(model.getHospitalId()); | |
| 57 | + setEnable(model.getEnable()); | |
| 58 | + setConfigs(model.getConfigs()); | |
| 59 | + return this; | |
| 60 | + } | |
| 61 | +} |