| | |
| | | private Integer status; |
| | | private Integer favor; |
| | | private List<ApplyStatus> statusSelectList; |
| | | private String controlProduct; |
| | | |
| | | |
| | | private LazyDataModel<SysReagent> reagentDataModel; |
| | | private LazyDataModel<SysReagent> reagentFavorDataModel; |
| | |
| | | if(selectedList!=null&&selectedList.size()>0){ |
| | | realDataList=selectedList; |
| | | }else { |
| | | realDataList=opeApplyService.getOpeApplyList(reagentName, startDeadline, endDeadline, status, getUserId(), null, queryCAS, null, null,null,applyUserName,(byte)1); |
| | | realDataList=opeApplyService.getOpeApplyList(reagentName, startDeadline,controlProduct, endDeadline, status, getUserId(), null, queryCAS, null, null,null,applyUserName,(byte)1); |
| | | |
| | | } |
| | | List<String> headerList = new ArrayList<>(); |
| | |
| | | public List<OpeApply> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) { |
| | | List<OpeApply> list = null; |
| | | try { |
| | | int count = opeApplyService.getOpeApplyTotalCount(reagentName, startDeadline, endDeadline, status, getUserId(), null, queryCAS,null,applyUserName,(byte)1); |
| | | int count = opeApplyService.getOpeApplyTotalCount(reagentName, startDeadline,controlProduct, endDeadline, status, getUserId(), null, queryCAS,null,applyUserName,(byte)1); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeApplyService.getOpeApplyList(reagentName, startDeadline, endDeadline, status, getUserId(), null, queryCAS, first, pageSize,null,applyUserName,(byte)1); |
| | | list = opeApplyService.getOpeApplyList(reagentName, startDeadline,controlProduct, endDeadline, status, getUserId(), null, queryCAS, first, pageSize,null,applyUserName,(byte)1); |
| | | for(int i=0;i<list.size();i++){ |
| | | if(list.get(i).getBeforeApproveUserId()!=null&&!list.get(i).getBeforeApproveUserId().equals("")){ |
| | | String name=list.get(i).getApproveUserName(); |
| | |
| | | String applyUserId = getUserId(); |
| | | int count = 0; |
| | | if (StringUtils.isNotBlank(applyUserId)) { |
| | | count = opeApplyService.getOpeApplyTotalCount(null, null, null, null, applyUserId, null, null,applyCode,null,(byte)1); |
| | | count = opeApplyService.getOpeApplyTotalCount(null, null, null,null, null, applyUserId, null, null,applyCode,null,(byte)1); |
| | | } |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeApplyService.getOpeApplyList(null, null, null, null, applyUserId, null, null, first, pageSize,applyCode,null,(byte)1); |
| | | list = opeApplyService.getOpeApplyList(null, null,null, null, null, applyUserId, null, null, first, pageSize,applyCode,null,(byte)1); |
| | | } |
| | | selectedList = null; |
| | | } catch (Exception e) { |
| | |
| | | public void setTabValue(int tabValue) { |
| | | this.tabValue = tabValue; |
| | | } |
| | | |
| | | public String getControlProduct() { |
| | | return controlProduct; |
| | | } |
| | | |
| | | public void setControlProduct(String controlProduct) { |
| | | this.controlProduct = controlProduct; |
| | | } |
| | | } |
| | |
| | | public List<OpeApply> load(int first, int pageSize, String sortField, SortOrder sortOrder, Map<String, Object> filters) { |
| | | List<OpeApply> list = null; |
| | | try { |
| | | int count = opeApplyService.getOpeApplyTotalCount(reagentName, startDeadline, endDeadline, ApplyStatus.APPROVED.getKey(), null, null, null,null,null,(byte)1); |
| | | int count = opeApplyService.getOpeApplyTotalCount(reagentName, startDeadline,null, endDeadline, ApplyStatus.APPROVED.getKey(), null, null, null,null,null,(byte)1); |
| | | this.setRowCount(count); |
| | | if (count > 0) { |
| | | list = opeApplyService.getOpeApplyList(reagentName, startDeadline, endDeadline, ApplyStatus.APPROVED.getKey(), null, null, null, first, pageSize,null,null,(byte)1); |
| | | list = opeApplyService.getOpeApplyList(reagentName, startDeadline,null, endDeadline, ApplyStatus.APPROVED.getKey(), null, null, null, first, pageSize,null,null,(byte)1); |
| | | } |
| | | } catch (Exception e) { |
| | | logger.error(e); |
| | |
| | | void insertList(List<OpeApply> opeApplyList); |
| | | |
| | | OpeApplyReserve getOpeApplyReserveListByNameForRowData(@Param("id") String rowKey); |
| | | |
| | | List<Map> getApplyControlInfo(); |
| | | |
| | | } |
| | |
| | | left join sys_user as sys on sys.id=oa.before_approve_user_id |
| | | left join sys_user as fir on fir.id=oa.first_user |
| | | left join base_meta as bm on sr.product_home = bm.id |
| | | left join base_meta as bm1 on bm1.id = sr.control_products |
| | | where oa.valid_flag = 1 |
| | | <if test="isShow != null and isShow ==0"> |
| | | and (ss.valid_flag = 1 or sr.type = 0) |
| | | </if> |
| | | <if test="controlProduct != null and controlProduct != ''"> |
| | | and bm1.meta_value like concat("%",#{controlProduct},"%") |
| | | </if> |
| | | <include refid="queryWhereSql"/> |
| | | order by oa.create_time desc |
| | |
| | | left join sys_user as sys on sys.id=oa.before_approve_user_id |
| | | left join sys_user as fir on fir.id=oa.first_user |
| | | left join base_meta as bm on sr.product_home = bm.id |
| | | left join base_meta as bm1 on bm1.id = sr.control_products |
| | | where oa.valid_flag = 1 |
| | | <if test="isShow != null and isShow ==0"> |
| | | and (ss.valid_flag = 1 or sr.type = 0) |
| | | </if> |
| | | <if test="controlProduct != null and controlProduct != ''"> |
| | | and bm1.meta_value like concat("%",#{controlProduct},"%") |
| | | </if> |
| | | <include refid="queryWhereSql"/> |
| | | </select> |
| | |
| | | |
| | | |
| | | </select> |
| | | <select id="getApplyControlInfo" resultType="java.util.Map"> |
| | | (SELECT sum(oa.num) sum,"易制毒" name from ope_apply oa |
| | | LEFT JOIN sys_reagent sr on oa.reagent_id = sr.id |
| | | LEFT JOIN base_meta bm on bm.id = sr.control_products |
| | | where |
| | | oa.valid_flag = 1 |
| | | and sr.valid_flag = 1 |
| | | and YEAR(oa.create_time)=YEAR(NOW()) |
| | | and oa.status in(2,3,4,6) |
| | | and |
| | | meta_value like "%易制毒%") UNION ALL( |
| | | |
| | | SELECT sum(oa.num) sum,"易制爆" name from ope_apply oa |
| | | LEFT JOIN sys_reagent sr on oa.reagent_id = sr.id |
| | | LEFT JOIN base_meta bm on bm.id = sr.control_products |
| | | where |
| | | oa.valid_flag = 1 |
| | | and sr.valid_flag = 1 |
| | | and YEAR(oa.create_time)=YEAR(NOW()) |
| | | and oa.status in(2,3,4,6) |
| | | and meta_value like "%易制爆%")UNION ALL( |
| | | |
| | | SELECT sum(oa.num) sum,"总数" name from ope_apply oa |
| | | LEFT JOIN sys_reagent sr on oa.reagent_id = sr.id |
| | | where |
| | | oa.valid_flag = 1 |
| | | and sr.valid_flag = 1 |
| | | and YEAR(oa.create_time)=YEAR(NOW()) |
| | | and oa.status in(2,3,4,6) |
| | | ) |
| | | |
| | | </select> |
| | | |
| | | |
| | | <update id="updateByReId" parameterType="java.util.Map"> |
| | |
| | | import java.math.BigDecimal; |
| | | import java.sql.Timestamp; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * Created by johnny on 17/12/12. |
| | | */ |
| | | public interface OpeApplyService { |
| | | |
| | | public List<OpeApply> getOpeApplyList(String reagentName, Timestamp startDeadline, Timestamp endDeadline, Integer status, |
| | | public List<OpeApply> getOpeApplyList(String reagentName, Timestamp startDeadline,String controlProduct, Timestamp endDeadline, Integer status, |
| | | String applyUserId, String approveUserId, String queryCas, |
| | | Integer first, Integer pageSize,String applyCode,String applyUserName,Byte isShow); |
| | | public List<OpeApply> getOpeApplyListForApproval(String applyUserName,String approvaUserName,String reagentName, Timestamp startDeadline, Timestamp endDeadline, Integer status, |
| | | String applyUserId, String approveUserId, String queryCas, |
| | | Integer first, Integer pageSize,String applyCode,String searchApproval); |
| | | public int getOpeApplyTotalCount(String reagentName, Timestamp startDeadline, Timestamp endDeadline, Integer status, |
| | | public int getOpeApplyTotalCount(String reagentName, Timestamp startDeadline,String controlProduct, Timestamp endDeadline, Integer status, |
| | | String applyUserId, String approveUserId, String queryCas,String applyCode,String applyUserName,Byte isShow); |
| | | public int getOpeApplyTotalCountForApproval(String applyUserName,String approvaUserName,String reagentName, Timestamp startDeadline, Timestamp endDeadline, Integer status, |
| | | String applyUserId, String approveUserId, String queryCas,String applyCode,String searchApproval); |
| | |
| | | private SysUserService sysUserService; |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public List<OpeApply> getOpeApplyList(String reagentName, Timestamp startDeadline, Timestamp endDeadline, Integer status, |
| | | public List<OpeApply> getOpeApplyList(String reagentName, Timestamp startDeadline, String controlProduct,Timestamp endDeadline, Integer status, |
| | | String applyUserId, String approveUserId, String queryCas, |
| | | Integer first, Integer pageSize,String applyCode,String applyUserName,Byte isShow) { |
| | | try { |
| | |
| | | params.put("endDeadline", endDeadline); |
| | | params.put("status", status); |
| | | params.put("isShow", isShow); |
| | | params.put("controlProduct", controlProduct); |
| | | |
| | | if (StringUtils.isNotBlank(applyUserId)) { |
| | | SysUser sysUser = sysUserService.getSysUser(applyUserId); |
| | |
| | | } |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public int getOpeApplyTotalCount(String reagentName, Timestamp startDeadline, Timestamp endDeadline, Integer status, |
| | | public int getOpeApplyTotalCount(String reagentName, Timestamp startDeadline,String controlProduct, Timestamp endDeadline, Integer status, |
| | | String applyUserId, String approveUserId, String queryCas,String applyCode,String applyUserName,Byte isShow) { |
| | | try { |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | |
| | | params.put("endDeadline", endDeadline); |
| | | params.put("status", status); |
| | | params.put("isShow", isShow); |
| | | params.put("controlProduct", controlProduct); |
| | | |
| | | if (StringUtils.isNotBlank(applyUserId)) { |
| | | SysUser sysUser = sysUserService.getSysUser(applyUserId); |
| | |
| | | <p:panel styleClass="center-header"> |
| | | <p:outputLabel styleClass="title" value="申购管理"></p:outputLabel> |
| | | |
| | | <p:panelGrid styleClass="filter" columns="13"> |
| | | <p:row> |
| | | <p:panelGrid styleClass="filter" columns="16"> |
| | | <p:outputLabel value="申购产品:"></p:outputLabel> |
| | | <p:inputText value="#{applyMngController.reagentName}"></p:inputText> |
| | | |
| | |
| | | <p:calendar value="#{applyMngController.endDeadline}" converter="timestampConvert" |
| | | pattern="yyyy-MM-dd" locale="zh_CN"></p:calendar> |
| | | <p:outputLabel value="状态:"></p:outputLabel> |
| | | </p:row> |
| | | <p:row> |
| | | |
| | | <p:selectOneMenu value="#{applyMngController.status}"> |
| | | <f:selectItem itemLabel="全部" itemValue="#{null}" noSelectionOption="true"></f:selectItem> |
| | |
| | | itemLabel="#{item.text}" itemValue="#{item.key}"></f:selectItems> |
| | | </p:selectOneMenu> |
| | | |
| | | <p:outputLabel value="管制品:"></p:outputLabel> |
| | | <p:selectOneMenu value="#{applyMngController.controlProduct}"> |
| | | <f:selectItem itemLabel="全部" itemValue="#{null}" noSelectionOption="true"></f:selectItem> |
| | | <f:selectItem itemLabel="易制毒" itemValue="易制毒" ></f:selectItem> |
| | | <f:selectItem itemLabel="易制爆" itemValue="易制爆" ></f:selectItem> |
| | | <f:selectItem itemLabel="剧毒" itemValue="剧毒" ></f:selectItem> |
| | | </p:selectOneMenu> |
| | | |
| | | <style type="text/css"> |
| | | .ui-selectonemenu.ui-widget.ui-state-default.ui-corner-all{ |
| | | min-width: 30px !important; |
| | | } |
| | | #centerRootPanel .center-header .filter .ui-selectonemenu { |
| | | width: 73px !important; |
| | | } |
| | | #centerRootPanel .center-header .filter input { |
| | | height: 30px; |
| | | background-color: #eaeef7!important; |
| | | width: 120px !important; |
| | | } |
| | | </style> |
| | | |
| | | <p:commandLink styleClass="search" process="@form" update="@form"></p:commandLink> |
| | | </p:row> |
| | | |
| | | </p:panelGrid> |
| | | </p:panel> |