| | |
| | | */ |
| | | private LazyDataModel<OpeReagentStatus> dataModel; |
| | | private String reagentId; |
| | | private String reagentName; |
| | | private String reagentCode; |
| | | private String applyPerson; |
| | | private Date startTime; |
| | |
| | | Map<String, Object> filters) { |
| | | List<OpeUseFlow> list = null; |
| | | try { |
| | | int count = opeUseFlowService.getPersonalUseInfoCount(reagentCode, getUserId(),startTime,endTime,receiptNumber,department,project); |
| | | int count = opeUseFlowService.getPersonalUseInfoCount(reagentCode, getUserId(),startTime,endTime,receiptNumber,department,project,applyPerson,reagentName); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeUseFlowService.getPersonalUseInfoList |
| | | (reagentCode, getUserId(),startTime,endTime ,receiptNumber,department,project,first,pageSize); |
| | | (reagentCode, getUserId(),startTime,endTime ,receiptNumber,department,project,applyPerson,reagentName,first,pageSize); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | |
| | | public void setPrintTable(Hashtable printTable) { |
| | | this.printTable = printTable; |
| | | } |
| | | |
| | | public String getReagentName() { |
| | | return reagentName; |
| | | } |
| | | |
| | | public void setReagentName(String reagentName) { |
| | | this.reagentName = reagentName; |
| | | } |
| | | } |
| | |
| | | private String warehouseName; |
| | | |
| | | private Integer editFlag; |
| | | private Integer isAllApply = 0; |
| | | private StreamedContent file; |
| | | @Value("${pdf.export.file.path}") |
| | | private String pdfExportFilePath; |
| | |
| | | } |
| | | |
| | | try { |
| | | int count = opeApplyService.getOpeApplyReserveTotalCountByNameFor(id,reagentId, userName,productSn,applyCode,status); |
| | | int count = opeApplyService.getOpeApplyReserveTotalCountByNameFor(id, reagentId, userName, productSn, applyCode, status, isAllApply); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeApplyService.getOpeApplyReserveListByNameFor(id,reagentId, userName, first, |
| | | pageSize,productSn,applyCode,status); |
| | | list = opeApplyService.getOpeApplyReserveListByNameFor(id, reagentId, userName, first, |
| | | pageSize, productSn, applyCode, status, isAllApply); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | |
| | | realDataList=selectedListForPerson; |
| | | }else { |
| | | realDataList = opeApplyService.getOpeApplyReserveListByNameFor(id,reagentId, userName, null, |
| | | null,productSn,applyCode,status); |
| | | null,productSn,applyCode,status,isAllApply); |
| | | } |
| | | List<String> headerList = new ArrayList<>(); |
| | | headerList.add("申购编号"); |
| | |
| | | public void setWarehouseName(String warehouseName) { |
| | | this.warehouseName = warehouseName; |
| | | } |
| | | |
| | | public Integer getIsAllApply() { |
| | | return isAllApply; |
| | | } |
| | | |
| | | public void setIsAllApply(Integer isAllApply) { |
| | | this.isAllApply = isAllApply; |
| | | } |
| | | } |
| | |
| | | LEFT JOIN sys_user as su1 on su1.id = project.sys_user_id |
| | | where oa.valid_flag = 1 and (oa.status=4 or oa.status=6) |
| | | <include refid="getOpeApplyReserveList_queryWhereSql" /> |
| | | <if test="isAllApply != null"> |
| | | <choose> |
| | | <when test="isAllApply == 1"> |
| | | and oa.used = oa.num |
| | | </when> |
| | | <otherwise> |
| | | and oa.used != oa.num |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | GROUP BY oa.id |
| | | )as oaa |
| | | </select> |
| | |
| | | LEFT JOIN sys_user as su1 on su1.id = project.sys_user_id |
| | | where oa.valid_flag = 1 and (oa.status=4 or oa.status=6) |
| | | <include refid="getOpeApplyReserveList_queryWhereSql" /> |
| | | <if test="isAllApply != null"> |
| | | <choose> |
| | | <when test="isAllApply == 1"> |
| | | and oa.used = oa.num |
| | | </when> |
| | | <otherwise> |
| | | and oa.used != oa.num |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | | GROUP BY oa.id |
| | | order by oa.update_time desc |
| | | <if test="first != null and pageSize != null"> |
| | |
| | | List<OpeUseFlow> selectPersonalUseInfo(Map params); |
| | | |
| | | List<PersonUseDetail> getApplyInfo(Map params); |
| | | |
| | | int getApplyInfoSize(Map params); |
| | | } |
| | |
| | | <if test="receiptNumber !=null and receiptNumber != ''"> |
| | | and ouf.receipt_number like concat("%",#{receiptNumber},"%") |
| | | </if> |
| | | <if test="reagentName !=null and reagentName != ''"> |
| | | and sr.name like concat("%",#{reagentName},"%") |
| | | </if> |
| | | <if test="applyPerson !=null and applyPerson != ''"> |
| | | and su.name like concat("%",#{applyPerson},"%") |
| | | </if> |
| | | group by ouf.receipt_number) a |
| | | |
| | | |
| | |
| | | <if test="receiptNumber !=null and receiptNumber != ''"> |
| | | and ouf.receipt_number like concat("%",#{receiptNumber},"%") |
| | | </if> |
| | | <if test="reagentName !=null and reagentName != ''"> |
| | | and sr.name like concat("%",#{reagentName},"%") |
| | | </if> |
| | | <if test="applyPerson !=null and applyPerson != ''"> |
| | | and su.name like concat("%",#{applyPerson},"%") |
| | | </if> |
| | | group by ouf.receipt_number |
| | | ORDER BY ouf.create_time desc |
| | | <if test="first != null and pageSize != null"> |
| | |
| | | and ouf.receipt_number = #{receiptNumber} |
| | | </select> |
| | | |
| | | |
| | | <select id="getApplyInfoSize" resultType="java.lang.Integer"> |
| | | SELECT |
| | | count(0) |
| | | from `ope_use_flow` ouf |
| | | LEFT JOIN ope_reagent_status ors ON ors.reagent_code = ouf.reagent_code |
| | | LEFT join sys_reagent sr ON ors.reagent_id = sr.id |
| | | LEFT JOIN base_meta bm ON bm.id = sr.reagent_format |
| | | LEFT JOIN base_meta bm1 on bm1.id = sr.reagent_unit |
| | | LEFT JOIN base_meta bm2 on bm2.id = sr.product_home |
| | | LEFT JOIN base_meta bm3 on bm3.id = sr.control_products |
| | | WHERE ouf.operatestate = #{operatestate} |
| | | and ouf.receipt_number = #{receiptNumber} |
| | | </select> |
| | | |
| | | <insert id="insertOpeUseFlow" parameterType="com.nanometer.smartlab.entity.OpeUseFlow"> |
| | | insert into ope_use_flow(id, reagent_code, status, house_id, container_id, user_id, remainder, place, store_type, valid_flag, create_time, realstatus, operatestate) |
| | | values (#{id}, #{reagentCode}, #{status}, #{houseId}, #{containerId}, #{userId}, #{remainder}, #{place}, #{storeType}, 1, #{createTime}, #{realstatus},#{operateState}) |
| | |
| | | int getOpeApplyReserveTotalCountByName(String id,String reagentName, String personName); |
| | | List<OpeApplyReserve> getOpeApplyReserveListByName(String id,String reagentName, String personName, Integer first, |
| | | Integer pageSize); |
| | | int getOpeApplyReserveTotalCountByNameFor(String id,String reagentName, String personName,String productSn,String applyCode,Integer status); |
| | | int getOpeApplyReserveTotalCountByNameFor(String id,String reagentName, String personName,String productSn,String applyCode,Integer status,Integer isAllApply); |
| | | List<OpeApplyReserve> getOpeApplyReserveListByNameFor(String id,String reagentName, String personName, Integer first, |
| | | Integer pageSize,String productSn,String applyCode,Integer status); |
| | | Integer pageSize,String productSn,String applyCode,Integer status,Integer isAllApply); |
| | | public boolean updaetOpeApplyPrice(BigDecimal applyPrice,String id); |
| | | public boolean updaetOpeApplyStockFlag(int stockFlag,String id); |
| | | public boolean cancelApply(ApplyStatus status,String id); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int getOpeApplyReserveTotalCountByNameFor(String id,String reagentName, String personName,String productSn,String applyCode,Integer status) { |
| | | public int getOpeApplyReserveTotalCountByNameFor(String id,String reagentName, String personName,String productSn,String applyCode,Integer status,Integer isAllApply) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("reagentName", reagentName); |
| | |
| | | params.put("productSn",productSn); |
| | | params.put("applyCode",applyCode); |
| | | params.put("status",status); |
| | | params.put("isAllApply",isAllApply); |
| | | return this.opeApplyDao.getOpeApplyReserveTotalCountFor(params); |
| | | } catch (DataAccessException e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | } |
| | | @Override |
| | | public List<OpeApplyReserve> getOpeApplyReserveListByNameFor(String id,String reagentName, String personName, Integer first, |
| | | Integer pageSize,String productSn,String applyCode,Integer status) { |
| | | Integer pageSize,String productSn,String applyCode,Integer status,Integer isAllApply) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | params.put("reagentName", reagentName); |
| | |
| | | params.put("productSn",productSn); |
| | | params.put("applyCode",applyCode); |
| | | params.put("status",status); |
| | | params.put("isAllApply",isAllApply); |
| | | return this.opeApplyDao.getOpeApplyReserveListFor(params); |
| | | } catch (DataAccessException e) { |
| | | logger.error(e.getMessage(), e); |
| | |
| | | |
| | | void updateReceiptNumberByCode2(List<OpeWarehouseReserve> codeTmp, String receiptNumber); |
| | | |
| | | int getPersonalUseInfoCount(String reagentCode,String userId, Date startTime, Date endTime, String receiptNumber, String department, String project); |
| | | int getPersonalUseInfoCount(String reagentCode,String userId, Date startTime, Date endTime, String receiptNumber, String department, String project,String applyPerson,String reagentName); |
| | | |
| | | List<OpeUseFlow> getPersonalUseInfoList(String reagentCode,String userId, Date startTime, Date endTime, String receiptNumber, String department, String project, int first, int pageSize); |
| | | List<OpeUseFlow> getPersonalUseInfoList(String reagentCode,String userId, Date startTime, Date endTime, String receiptNumber, String department, String project,String applyPerson,String reagentName, int first, int pageSize); |
| | | |
| | | List<PersonUseDetail> getApplyInfo(String receiptNumber); |
| | | |
| | | int getApplyInfoSize(String receiptNumber); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int getPersonalUseInfoCount(String reagentCode,String userId, Date startTime, Date endTime, String receiptNumber, String department, String project) { |
| | | public int getPersonalUseInfoCount(String reagentCode,String userId, Date startTime, Date endTime, String receiptNumber, |
| | | String department, String project,String applyPerson,String reagentName) { |
| | | Map<String,Object> params = new HashMap<>(); |
| | | params.put("userId", userId); |
| | | params.put("startTime", startTime); |
| | |
| | | params.put("department", department); |
| | | params.put("project", project); |
| | | params.put("reagentCode", reagentCode); |
| | | params.put("applyPerson", applyPerson); |
| | | if (StringUtils.isNotBlank(reagentName)) { |
| | | //根据试剂名获取单号 |
| | | |
| | | } |
| | | params.put("reagentName", reagentName); |
| | | //操作状态位仓库领取 |
| | | Map<String, String> metaMap2 = new HashMap<>(); |
| | | metaMap2.put("groupId", "operate_status"); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<OpeUseFlow> getPersonalUseInfoList(String reagentCode,String userId, Date startTime, Date endTime, String receiptNumber, String department, String project, int first, int pageSize) { |
| | | public List<OpeUseFlow> getPersonalUseInfoList(String reagentCode,String userId, Date startTime, Date endTime, String receiptNumber, |
| | | String department, String project,String applyPerson,String reagentName, int first, int pageSize) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("userId", userId); |
| | | params.put("startTime", startTime); |
| | |
| | | params.put("department", department); |
| | | params.put("project", project); |
| | | params.put("reagentCode", reagentCode); |
| | | params.put("applyPerson", applyPerson); |
| | | params.put("reagentName", reagentName); |
| | | //操作状态位仓库领取 |
| | | Map<String, String> metaMap2 = new HashMap<>(); |
| | | metaMap2.put("groupId", "operate_status"); |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public int getApplyInfoSize(String receiptNumber) { |
| | | Map<String,Object> params = new HashMap<>(); |
| | | Map<String, String> metaMap2 = new HashMap<>(); |
| | | metaMap2.put("groupId", "operate_status"); |
| | | metaMap2.put("metaKey", String.valueOf(OperateStatus.WAREHOUSEOUT.getKey())); |
| | | List<BaseMeta> baseMetas = baseMetaDao.getBaseMetaList(metaMap2); |
| | | params.put("operatestate", baseMetas.get(0).getId()); |
| | | params.put("receiptNumber", receiptNumber); |
| | | |
| | | return opeUseFlowDao.getApplyInfoSize(params); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | } |
| | | </style> |
| | | <p:panel styleClass="center-header"> |
| | | <p:panelGrid styleClass="filter" columns="13"> |
| | | <p:panelGrid styleClass="filter" columns="10"> |
| | | |
| | | <p:outputLabel value="单据编号:"/> |
| | | <p:inputText value="#{personalUseInfoController.receiptNumber}"/> |
| | | |
| | | <p:outputLabel value="试剂名称:"/> |
| | | <p:inputText value="#{personalUseInfoController.reagentName}"/> |
| | | |
| | | <p:outputLabel value="申领人:"/> |
| | | <p:inputText value="#{personalUseInfoController.applyPerson}"/> |
| | | |
| | | <p:outputLabel value="课题组:"/> |
| | | <p:inputText value="#{personalUseInfoController.project}"/> |
| | |
| | | selectionMode="single" |
| | | emptyMessage="无数据" |
| | | selection="#{personalUseInfoController.selectOne}" |
| | | rows="20" pageLinks="5"> |
| | | rows="10" pageLinks="5"> |
| | | |
| | | <!-- <p:column selectionMode="multiple" style="width: 30px;text-align: center;"/>--> |
| | | <p:column headerText="单据编号"> |
| | |
| | | </p:column> |
| | | |
| | | <p:column headerText="领用数量" width="50"> |
| | | <h:outputText value="#{row.applyNum}"/> |
| | | <h:outputText value="#{personalUseInfoController.reagentName eq null |
| | | or personalUseInfoController.reagentName eq ''?row.applyNum:OpeUseFlowService.getApplyInfoSize(row.getReceiptNumber())}"/> |
| | | </p:column> |
| | | |
| | | <p:column headerText="课题组"> |
| | |
| | | </div> |
| | | <h:form id="warehouseStockMngFormForPerson"> |
| | | <p:panel styleClass="center-header" style="border-bottom:none;"> |
| | | <p:panelGrid styleClass="filter" columns="12"> |
| | | <p:panelGrid styleClass="filter" columns="14"> |
| | | <style type="text/css"> |
| | | .ui-selectonemenu.ui-widget.ui-state-default.ui-corner-all{ |
| | | min-width: 60px !important; |
| | | } |
| | | .ui-selectonemenu-items.ui-selectonemenu-list.ui-widget-content.ui-widget.ui-corner-all.ui-helper-reset{ |
| | | width: 77px !important; |
| | | } |
| | | </style> |
| | | |
| | | <p:outputLabel value="试剂名称:"></p:outputLabel> |
| | | <p:inputText value="#{warehouseStockMngController.reagentId}"></p:inputText> |
| | |
| | | <p:outputLabel value="产品编号:"></p:outputLabel> |
| | | <p:inputText value="#{warehouseStockMngController.productSn}"></p:inputText> |
| | | <p:outputLabel value="状态:"></p:outputLabel> |
| | | <p:selectOneMenu value="#{warehouseStockMngController.status}"> |
| | | <p:selectOneMenu value="#{warehouseStockMngController.status}" style="width: 60px;"> |
| | | <f:selectItem itemLabel="全部" noSelectionOption="true"></f:selectItem> |
| | | <f:selectItems value="#{warehouseStockMngController.statusSelectList}" var="item" |
| | | itemLabel="#{item.text}" itemValue="#{item.key}"></f:selectItems> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:outputLabel value="已领用:"></p:outputLabel> |
| | | <p:selectOneMenu value="#{warehouseStockMngController.isAllApply}" style="width: 60px;"> |
| | | <f:selectItem itemLabel="否" itemValue="0"/> |
| | | <f:selectItem itemLabel="是" itemValue="1"/> |
| | | <f:selectItem itemLabel="全部" noSelectionOption="true"/> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink> |
| | | </p:panelGrid> |
| | | </p:panel> |