| | |
| | | |
| | | public void onSaveBtnClick() { |
| | | try { |
| | | |
| | | if (!StringUtils.isNotBlank(sysLaboratoryContainer.getProjectId())){ |
| | | sysLaboratoryContainer.setProjectId(null); |
| | | } |
| | | |
| | | // 新建 |
| | | if (this.action == Constants.ACTION_ADD) { |
| | | if (this.sysLaboratoryContainer == null) { |
| | |
| | | return; |
| | | } |
| | | System.out.println(sysLaboratoryContainer.getContainerCode()); |
| | | if (!StringUtils.isNotBlank(sysLaboratoryContainer.getProjectId())){ |
| | | sysLaboratoryContainer.setProjectId(null); |
| | | } |
| | | |
| | | this.sysLaboratoryContainerService.insertSysLaboratoryContainer(sysLaboratoryContainer); |
| | | |
| | | FacesUtils.info("新建成功。"); |
| | |
| | | <update id="updateSysLaboratoryContainer" parameterType="com.nanometer.smartlab.entity.SysLaboratoryContainer"> |
| | | update sys_laboratory_container set laboratory_id=#{laboratoryId}, type=#{type}, container_code=#{containerCode}, info_code=#{infoCode}, |
| | | structure=#{structure}, name=#{name}, character_left=#{characterLeft}, character_right=#{characterRight},controller_code=#{controllerCode}, |
| | | update_time=now() |
| | | update_time=now(),project_id = #{projectId} |
| | | where id=#{id} |
| | | </update> |
| | | |
| | |
| | | <p:selectOneMenu value="#{laboratoryContainerMngController.sysLaboratoryContainer.projectId}"> |
| | | <f:selectItem itemLabel="不选择课题组" /> |
| | | <f:selectItems value="#{sysProjectServiceImpl.getAll()}" |
| | | var="item" itemLabel="#{item.projectName}" itemValue="#{item.id}"></f:selectItems> |
| | | var="item" itemLabel="#{item.project}" itemValue="#{item.id}"></f:selectItems> |
| | | </p:selectOneMenu> |
| | | |
| | | </p:panelGrid> |