模块:实验室临时存储管理
修改:新增和修改的课题选项
提出:秦老师
注意: 新增字段sys_laboratory_controller(project_id)
| | |
| | | import com.nanometer.smartlab.entity.BaseMeta; |
| | | import com.nanometer.smartlab.entity.SysLaboratory; |
| | | import com.nanometer.smartlab.service.SysLaboratoryService; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.log4j.Logger; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.apache.poi.ss.usermodel.Row; |
| | |
| | | return; |
| | | } |
| | | System.out.println(sysLaboratoryContainer.getContainerCode()); |
| | | if (!StringUtils.isNotBlank(sysLaboratoryContainer.getProjectId())){ |
| | | sysLaboratoryContainer.setProjectId(null); |
| | | } |
| | | this.sysLaboratoryContainerService.insertSysLaboratoryContainer(sysLaboratoryContainer); |
| | | |
| | | FacesUtils.info("新建成功。"); |
| | |
| | | </select> |
| | | |
| | | <select id="getSysLaboratoryContainer" parameterType="java.lang.String" resultMap="SysLaboratoryContainer" > |
| | | select su.*,ss.name as laboratoryName, ss.type as laboratoryType from sys_laboratory_container as su |
| | | select su.*,ss.name as laboratoryName, ss.type as laboratoryType ,su.project_id projectId from sys_laboratory_container as su |
| | | left join sys_laboratory as ss on su.laboratory_id = ss.id |
| | | where su.id = #{id} and su.valid_flag = 1 |
| | | </select> |
| | |
| | | </select> |
| | | |
| | | <select id="getSysLaboratoryContainerList" parameterType="java.util.Map" resultMap="SysLaboratoryContainer"> |
| | | select su.*,ss.name as laboratoryName, ss.type as laboratoryType,sc.controller_name as controllerName from sys_laboratory_container as su |
| | | select su.*,ss.name as laboratoryName, ss.type as laboratoryType,sc.controller_name as controllerName,su.project_id as projectId from sys_laboratory_container as su |
| | | left join sys_laboratory as ss on su.laboratory_id = ss.id |
| | | left join sys_controller sc on sc.controller_code=su.controller_code |
| | | where su.valid_flag = 1 |
| | |
| | | </select> |
| | | |
| | | <insert id="insertSysLaboratoryContainer" parameterType="com.nanometer.smartlab.entity.SysLaboratoryContainer"> |
| | | insert into sys_laboratory_container(id, laboratory_id, type, container_code, info_code, structure, name, valid_flag, character_left, character_right, create_time, update_time, controller_code) |
| | | values (#{id}, #{laboratoryId}, #{type}, #{containerCode}, #{infoCode}, #{structure}, #{name}, 1, #{characterLeft}, #{characterRight}, now(), now(), #{controllerCode}) |
| | | insert into sys_laboratory_container(id, laboratory_id, type, container_code, info_code, structure, name, valid_flag, character_left, character_right, create_time, update_time, controller_code,project_id) |
| | | values (#{id}, #{laboratoryId}, #{type}, #{containerCode}, #{infoCode}, #{structure}, #{name}, 1, #{characterLeft}, #{characterRight}, now(), now(), #{controllerCode},#{projectId}) |
| | | </insert> |
| | | |
| | | <update id="updateSysLaboratoryContainer" parameterType="com.nanometer.smartlab.entity.SysLaboratoryContainer"> |
| | |
| | | private String characterRight; |
| | | private String controllerCode; |
| | | private String controllerName; |
| | | private String projectId; |
| | | |
| | | public String getControllerName() { |
| | | return controllerName; |
| | |
| | | public void setControllerCode(String controllerCode) { |
| | | this.controllerCode = controllerCode; |
| | | } |
| | | |
| | | public String getProjectId() { |
| | | return projectId; |
| | | } |
| | | |
| | | public void setProjectId(String projectId) { |
| | | this.projectId = projectId; |
| | | } |
| | | } |
| | |
| | | pageLinks="5"> |
| | | <p:column selectionMode="multiple" style="width: 30px;text-align: center;" /> |
| | | |
| | | <p:column headerText="实验室类型"> |
| | | <h:outputText value="#{baseMetaService.getBaseMetaValue(row.laboratoryType)}"></h:outputText> |
| | | </p:column> |
| | | <!-- <p:column headerText="实验室类型">--> |
| | | <!-- <h:outputText value="#{baseMetaService.getBaseMetaValue(row.laboratoryType)}"></h:outputText>--> |
| | | <!-- </p:column>--> |
| | | |
| | | <p:column headerText="实验室名"> |
| | | <h:outputText value="#{row.laboratoryName}"></h:outputText> |
| | | </p:column> |
| | | |
| | | <p:column headerText="课题组"> |
| | | <h:outputText value="#{sysProjectServiceImpl.getSysProject(row.projectId).projectName}"></h:outputText> |
| | | </p:column> |
| | | |
| | | <p:column headerText="主控名称"> |
| | | <h:outputText value="#{row.controllerName}"></h:outputText> |
| | | </p:column> |
| | |
| | | value="#{baseMetaService.getBaseMetaList(constants.BASE_META_GROUP_REAGENT_CHARACTER)}" |
| | | var="item" itemLabel="#{item.metaValue}" itemValue="#{item.id}"></f:selectItems> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:outputLabel value="课题组"></p:outputLabel> |
| | | <p:selectOneMenu value="#{laboratoryContainerMngController.sysLaboratoryContainer.projectId}"> |
| | | <f:selectItem itemLabel="不选择课题组" /> |
| | | <f:selectItems value="#{sysProjectServiceImpl.getAll()}" |
| | | var="item" itemLabel="#{item.projectName}" itemValue="#{item.id}"></f:selectItems> |
| | | </p:selectOneMenu> |
| | | |
| | | </p:panelGrid> |
| | | <p:panel styleClass="btn"> |
| | | <p:commandButton value="保存" |