| | |
| | | @Lazy |
| | | @Resource |
| | | private SysWarehouseStatusService sysWarehouseStatusService; |
| | | @Lazy |
| | | @Resource |
| | | private SysReagentService sysReagentService; |
| | | |
| | | @Value("${institute.url}") |
| | | String instituteUrl; |
| | | |
| | |
| | | return ResponseModel.getErrInstance("系统内部错误"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 试剂流向追踪 |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/reagentFlows",method = RequestMethod.GET) |
| | | public Object reagentFlows(@RequestParam(required=false,defaultValue = "1") Integer pageNum,@RequestParam(required=false,defaultValue = "10") Integer pageSize,OpeUseFlowQueryDto opeUseFlowQueryDto){ |
| | | try { |
| | | return ResponseModel.getOkInstence(opeUseFlowService.getOpeUseFlowSimpleInfoList(pageNum, pageSize, opeUseFlowQueryDto)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResponseModel.getErrInstance("系统内部错误"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 试剂管理分页查询 |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/reagentList",method = RequestMethod.GET) |
| | | public Object reagentList(@RequestParam(required=false,defaultValue = "1") Integer pageNum,@RequestParam(required=false,defaultValue = "10") Integer pageSize,String name,String cas){ |
| | | try { |
| | | return ResponseModel.getOkInstence(sysReagentService.reagentList(pageNum,pageSize,name,cas)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResponseModel.getErrInstance("系统内部错误"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 实验室管理分页查询 |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/labList",method = RequestMethod.GET) |
| | | public Object labList(@RequestParam(required=false,defaultValue = "1") Integer pageNum,@RequestParam(required=false,defaultValue = "10") Integer pageSize,String name){ |
| | | try { |
| | | return ResponseModel.getOkInstence(sysLaboratoryService.getSysLaboratoryList(pageNum,pageSize,name)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResponseModel.getErrInstance("系统内部错误"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 实验室临时库存管理分页查询 |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/labContainerList",method = RequestMethod.GET) |
| | | public Object labContainerList(@RequestParam(required=false,defaultValue = "1") Integer pageNum,@RequestParam(required=false,defaultValue = "10") Integer pageSize,String name,String controllerName){ |
| | | try { |
| | | return ResponseModel.getOkInstence(sysLaboratoryContainerService.getSysLaboratoryContainerList(pageNum,pageSize,name,controllerName)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResponseModel.getErrInstance("系统内部错误"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 人员管理分页查询 |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @RequestMapping(value = "/userList",method = RequestMethod.GET) |
| | | public Object userList(@RequestParam(required=false,defaultValue = "1") Integer pageNum,@RequestParam(required=false,defaultValue = "10") Integer pageSize,String name){ |
| | | try { |
| | | return ResponseModel.getOkInstence(sysUserService.getSysUserList(pageNum,pageSize,name)); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResponseModel.getErrInstance("系统内部错误"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | public boolean isAccess(String info) { |
| | | String permission = role.getBtnPermission(); |
| | | if(StringUtils.isEmpty(permission)){ |
| | | return true; |
| | | }else{ |
| | | return permission.contains(info); |
| | | } |
| | | } |
| | | |
| | | public LazyDataModel<SysUser> getDataModel() { |
| | |
| | | try { |
| | | //做可见人员过滤 |
| | | String userPermission = role.getUserPermission(); |
| | | userPermission="11"; |
| | | if (userPermission.contains("自己")) { |
| | | list = Collections.singletonList(sysUserService.getSysUser(UserMngController.this.sysUser.getId())); |
| | | this.setRowCount(1); |
| | |
| | | |
| | | List<Map> selectDetail(Map<String, Object> params); |
| | | |
| | | |
| | | /** |
| | | * 获取试剂流向,字段信息减少 |
| | | * @param params |
| | | * @return |
| | | */ |
| | | List<OpeUseFlow> getOpeUseFlowSimpleInfoList(Map params); |
| | | |
| | | } |
| | |
| | | </association> |
| | | </resultMap> |
| | | |
| | | |
| | | |
| | | <update id="updateTimeByCode" parameterType="java.util.Map"> |
| | | update ope_use_flow set create_time=now() where reagent_code=#{code} and status=#{status} |
| | | </update> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="getOpeUseFlowTotalCount" parameterType="java.util.Map" resultType="int"> |
| | | select count(1) |
| | | from ope_use_flow as oa |
| | |
| | | where oa.valid_flag = 1 |
| | | <include refid="queryWhereSql"/> |
| | | </select> |
| | | |
| | | <select id="getOpeUseFlowSimpleInfoList" parameterType="java.util.Map" resultMap="OpeUseFlow"> |
| | | select oa.id,oa.reagent_code,oa.create_time, |
| | | sr.id as reagentId,sr.name as name,sr.cas as cas, |
| | | su.name as userName, |
| | | l.name as laboratoryName, |
| | | w.name as warehouseName, |
| | | wc.name as warehouseContainerName, |
| | | lc.name as laboratoryContainerName, |
| | | wc.container_code as warehouseContainerCode, |
| | | lc.container_code as laboratoryContainerCode, |
| | | bm1.meta_value as operatestateName |
| | | from ope_use_flow as oa |
| | | left join ope_reagent_status ors on ors.reagent_code = oa.reagent_code |
| | | left join sys_reagent sr on ors.reagent_id = sr.id |
| | | left join sys_user as su on oa.user_id = su.id |
| | | left join sys_warehouse_container wc on wc.id = oa.container_id |
| | | left join sys_warehouse w on w.id = wc.warehouse_id |
| | | left join sys_laboratory_container lc on lc.id = oa.container_id |
| | | left join sys_laboratory l on l.id = lc.laboratory_id |
| | | left join base_meta bm1 on bm1.id = oa.operatestate |
| | | where oa.valid_flag = 1 |
| | | <include refid="queryWhereSql"/> |
| | | order by oa.create_time desc |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="getOpeUseFlowByCode" resultType="com.nanometer.smartlab.entity.OpeUseFlow"> |
| | | SELECT |
| | | * |
| | |
| | | SysLaboratoryContainer getSysLaboratoryContainer(String id) throws DataAccessException; |
| | | @SuppressWarnings("rawtypes") |
| | | List<SysLaboratoryContainer> getSysLaboratoryContainerList(Map params) throws DataAccessException; |
| | | |
| | | List<SysLaboratoryContainer> getSysLaboratoryContainerSimpleInfoList(Map params); |
| | | |
| | | @SuppressWarnings("rawtypes") |
| | | int getSysLaboratoryContainerTotalCount(Map params) throws DataAccessException; |
| | | |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="getSysLaboratoryContainerSimpleInfoList" parameterType="java.util.Map" resultMap="SysLaboratoryContainer"> |
| | | select su.id,su.name,su.container_code,su.info_code,su.project as project,bm1.meta_value as type,bm2.meta_value as structure, |
| | | ss.name as laboratoryName,sc.controller_name as controllerName 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 |
| | | left join base_meta bm1 ON bm1.id = su.type |
| | | left join base_meta bm2 ON bm2.id = su.structure |
| | | where su.valid_flag = 1 |
| | | AND sc.valid_flag = 1 |
| | | AND ss.valid_flag = 1 |
| | | <if test="laboratoryName != null and laboratoryName != ''"> |
| | | and ss.name like #{laboratoryName} |
| | | </if> |
| | | <if test="controllerName != null and controllerName != ''"> |
| | | and sc.controller_name like concat("%",#{controllerName},"%") |
| | | </if> |
| | | order by su.create_time desc |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="exportExcelList" parameterType="java.util.Map" resultType="java.util.Map"> |
| | | SELECT |
| | | bm2.meta_value labType, |
| | |
| | | public SysLaboratory getSysLaboratory(String id) throws DataAccessException; |
| | | @SuppressWarnings("rawtypes") |
| | | public List<SysLaboratory> getSysLaboratoryList(Map params) throws DataAccessException; |
| | | |
| | | public List<SysLaboratory> getSysLaboratorySimpleInfoList(Map params); |
| | | public List<SysLaboratory> getAllSysLaboratoryList() throws DataAccessException; |
| | | @SuppressWarnings("rawtypes") |
| | | public int getSysLaboratoryTotalCount(Map params) throws DataAccessException; |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSysLaboratorySimpleInfoList" parameterType="java.util.Map" resultMap="SysLaboratory"> |
| | | select su.id,su.name,su.info_code,su.bar_code,su.location1,su.location2,su.project,su.create_time,su.update_time,bm1.meta_value as type,bm2.meta_value as department from sys_laboratory as su |
| | | left join base_meta as bm1 on bm1.id=su.type |
| | | left join base_meta as bm2 on bm2.id=su.department |
| | | where su.valid_flag = 1 |
| | | <include refid="queryWhereSql"/> |
| | | order by su.create_time desc |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="exportLabList" parameterType="java.util.Map" resultType="java.util.Map"> |
| | | SELECT bm1.meta_value type ,sl.name,sl.info_code infoCode,sl.bar_code barCode, |
| | | CASE |
| | |
| | | //试剂库总数 |
| | | int reagentCount(Map params); |
| | | List<SysReagent> reagentList(Map params); |
| | | |
| | | List<SysReagent> reagentSimpleInfoList(Map params); |
| | | |
| | | int reagentSimpleInfoCount(Map params); |
| | | int favorCount(Map params); |
| | | List<SysReagent> favorList(Map params); |
| | | Map getSysReagentDetail(String id); |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="reagentSimpleInfoList" resultMap="SysReagent"> |
| | | select sr.id,sr.name,sr.cas,sr.product_sn,sr.create_time,sr.update_time,bm.meta_value as reagent_type,bm2.meta_value as reagent_character from sys_reagent sr |
| | | left join base_meta as bm on bm.id=sr.reagent_type |
| | | left join base_meta as bm2 on bm2.id=sr.reagent_character |
| | | <where> |
| | | and sr.valid_flag = 1 and sr.type=1 |
| | | <if test="cas != null and cas != ''"> |
| | | and sr.cas like concat("%", #{cas} ,"%") |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and sr.name like concat("%", #{name} ,"%") |
| | | </if> |
| | | </where> |
| | | order by sr.create_time desc |
| | | limit #{first},#{pageSize} |
| | | </select> |
| | | <select id="reagentSimpleInfoCount" resultType="int"> |
| | | select count(1) from sys_reagent sr |
| | | <where> |
| | | and sr.valid_flag = 1 and sr.type=1 |
| | | <if test="cas != null and cas != ''"> |
| | | and sr.cas like concat("%", #{cas} ,"%") |
| | | </if> |
| | | <if test="name != null and name != ''"> |
| | | and sr.name like concat("%", #{name} ,"%") |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="favorList" parameterType="java.util.Map" resultMap="SysReagent"> |
| | | select sr.*, ss.meta_value as product_home_name, |
| | | bm.meta_value as control_products_name, |
| | |
| | | public SysUser getSysUserForSuppllier(String id) throws DataAccessException; |
| | | public SysUser getSysUserByIdCard(String idCard) throws DataAccessException; |
| | | public List<SysUser> getSysUserList(Map params) throws DataAccessException; |
| | | |
| | | public List<SysUser> getSysUserSimpleInfoList(Map params); |
| | | public List<SysUser> getHasProjectSysUserList(Map params) throws DataAccessException; |
| | | public int getSysUserTotalCount(Map params) throws DataAccessException; |
| | | |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getSysUserSimpleInfoList" parameterType="java.util.Map" resultMap="SysUser"> |
| | | select su.id,su.arp,su.account,su.name,su.phone,su.email,su.create_time,su.project,bm.meta_value as department,bm1.meta_value as company from sys_user as su |
| | | left join base_meta bm on su.department = bm.id |
| | | left join base_meta bm1 on bm1.id = su.company |
| | | where su.valid_flag = 1 |
| | | <include refid="queryWhereSql"/> |
| | | order by su.arp ASC |
| | | <if test="first != null and pageSize != null"> |
| | | limit #{first}, #{pageSize} |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="getHasProjectSysUserList" parameterType="java.util.Map" resultMap="SysUser"> |
| | | select DISTINCT su.*, br.name as roleName from sys_user as su |
| | | left join base_role as br on su.role_id = br.id inner join sys_project as sp on su.id=sp.sys_user_id |
| | |
| | | package com.nanometer.smartlab.entity; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.nanometer.smartlab.entity.enumtype.ArrivalStatus; |
| | | import com.nanometer.smartlab.entity.enumtype.RealStatus; |
| | | import com.nanometer.smartlab.entity.enumtype.StoreType; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.sql.Timestamp; |
| | | |
| | | import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; |
| | | |
| | | /** |
| | | * Created by johnny on 17/11/23. |
| | | */ |
| | | @JsonInclude(NON_NULL) |
| | | public class OpeUseFlow implements Serializable { |
| | | |
| | | private String id; |
| | |
| | | package com.nanometer.smartlab.entity; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; |
| | | |
| | | /** |
| | | * Created by johnny on 17/11/23. |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @JsonInclude(NON_NULL) |
| | | public class SysLaboratory implements Serializable { |
| | | |
| | | private String id; |
| | |
| | | package com.nanometer.smartlab.entity; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | import java.util.*; |
| | | |
| | | import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; |
| | | |
| | | /** |
| | | * Created by johnny on 17/11/23. |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @JsonInclude(NON_NULL) |
| | | public class SysLaboratoryContainer implements Serializable { |
| | | |
| | | private String id; |
| | |
| | | package com.nanometer.smartlab.entity; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.nanometer.smartlab.entity.enumtype.DangerousFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | import sun.awt.SunHints; |
| | |
| | | import java.sql.Timestamp; |
| | | import java.util.Vector; |
| | | |
| | | import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; |
| | | |
| | | /** |
| | | * Created by johnny on 17/11/23. |
| | | */ |
| | | @JsonInclude(NON_NULL) |
| | | public class SysReagent implements Serializable { |
| | | |
| | | private String id; |
| | |
| | | import java.math.BigDecimal; |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonInclude; |
| | | import com.nanometer.smartlab.entity.enumtype.ApproverFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.SeeFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.ValidFlag; |
| | | import com.nanometer.smartlab.entity.enumtype.Waster; |
| | | |
| | | import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; |
| | | |
| | | /** |
| | | * Created by johnny on 17/11/18. |
| | | */ |
| | | @JsonInclude(NON_NULL) |
| | | public class SysUser implements Serializable { |
| | | |
| | | private String id; |
对比新文件 |
| | |
| | | package com.nanometer.smartlab.entity.dto; |
| | | |
| | | import java.util.Date; |
| | | |
| | | public class OpeUseFlowQueryDto { |
| | | /** |
| | | * 场所名称 |
| | | */ |
| | | private String houseName; |
| | | /** |
| | | * 试剂名称 |
| | | */ |
| | | private String reagentName; |
| | | /** |
| | | * 试剂条形码 |
| | | */ |
| | | private String reagentCode; |
| | | |
| | | /** |
| | | * 柜号 |
| | | */ |
| | | private String containerCode; |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | private String startDate; |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | private String endDate; |
| | | /** |
| | | * 操作状态 |
| | | * |
| | | */ |
| | | private String operatestate; |
| | | |
| | | public OpeUseFlowQueryDto(){} |
| | | |
| | | public OpeUseFlowQueryDto(String houseName, String reagentName, String reagentCode, String containerCode, String startDate, String endDate, String operatestate) { |
| | | this.houseName = houseName; |
| | | this.reagentName = reagentName; |
| | | this.reagentCode = reagentCode; |
| | | this.containerCode = containerCode; |
| | | this.startDate = startDate; |
| | | this.endDate = endDate; |
| | | this.operatestate = operatestate; |
| | | } |
| | | |
| | | public String getHouseName() { |
| | | return houseName; |
| | | } |
| | | |
| | | public void setHouseName(String houseName) { |
| | | this.houseName = houseName; |
| | | } |
| | | |
| | | public String getReagentName() { |
| | | return reagentName; |
| | | } |
| | | |
| | | public void setReagentName(String reagentName) { |
| | | this.reagentName = reagentName; |
| | | } |
| | | |
| | | public String getReagentCode() { |
| | | return reagentCode; |
| | | } |
| | | |
| | | public void setReagentCode(String reagentCode) { |
| | | this.reagentCode = reagentCode; |
| | | } |
| | | |
| | | public String getContainerCode() { |
| | | return containerCode; |
| | | } |
| | | |
| | | public void setContainerCode(String containerCode) { |
| | | this.containerCode = containerCode; |
| | | } |
| | | |
| | | public String getStartDate() { |
| | | return startDate; |
| | | } |
| | | |
| | | public void setStartDate(String startDate) { |
| | | this.startDate = startDate; |
| | | } |
| | | |
| | | public String getEndDate() { |
| | | return endDate; |
| | | } |
| | | |
| | | public void setEndDate(String endDate) { |
| | | this.endDate = endDate; |
| | | } |
| | | |
| | | public String getOperatestate() { |
| | | return operatestate; |
| | | } |
| | | |
| | | public void setOperatestate(String operatestate) { |
| | | this.operatestate = operatestate; |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.nanometer.smartlab.model; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 通用分页数据封装类 |
| | | */ |
| | | public class CommonPage<T> { |
| | | /** |
| | | * 当前页码 |
| | | */ |
| | | private Integer pageNum; |
| | | /** |
| | | * 每页数量 |
| | | */ |
| | | private Integer pageSize; |
| | | /** |
| | | * 总页数 |
| | | */ |
| | | private Integer totalPage; |
| | | /** |
| | | * 总条数 |
| | | */ |
| | | private Long total; |
| | | /** |
| | | * 分页数据 |
| | | */ |
| | | private List<T> list; |
| | | |
| | | |
| | | public static Integer getTotalPage(Long total,Integer pageSize) { |
| | | if(total%pageSize!=0){ |
| | | return Math.toIntExact(total / pageSize + 1); |
| | | }else{ |
| | | return Math.toIntExact(total / pageSize); |
| | | } |
| | | } |
| | | |
| | | public Integer getPageNum() { |
| | | return pageNum; |
| | | } |
| | | |
| | | public void setPageNum(Integer pageNum) { |
| | | this.pageNum = pageNum; |
| | | } |
| | | |
| | | public Integer getPageSize() { |
| | | return pageSize; |
| | | } |
| | | |
| | | public void setPageSize(Integer pageSize) { |
| | | this.pageSize = pageSize; |
| | | } |
| | | |
| | | public Integer getTotalPage() { |
| | | return totalPage; |
| | | } |
| | | |
| | | public void setTotalPage(Integer totalPage) { |
| | | this.totalPage = totalPage; |
| | | } |
| | | |
| | | public List<T> getList() { |
| | | return list; |
| | | } |
| | | |
| | | public void setList(List<T> list) { |
| | | this.list = list; |
| | | } |
| | | |
| | | public Long getTotal() { |
| | | return total; |
| | | } |
| | | |
| | | public void setTotal(Long total) { |
| | | this.total = total; |
| | | } |
| | | } |
| | |
| | | import com.nanometer.smartlab.entity.OpeApplyReserve; |
| | | import com.nanometer.smartlab.entity.OpeUseFlow; |
| | | import com.nanometer.smartlab.entity.OpeWarehouseReserve; |
| | | import com.nanometer.smartlab.entity.dto.OpeUseFlowQueryDto; |
| | | import com.nanometer.smartlab.entity.dto.PersonUseDetail; |
| | | import com.nanometer.smartlab.model.CommonPage; |
| | | |
| | | import java.text.ParseException; |
| | | import java.util.Date; |
| | |
| | | List<Map> selectExportDetail(String reagentCode, String userId, Date startTime, Date endTime, String receiptNumber, String department, String project, String applyPerson, String reagentName); |
| | | |
| | | boolean export22Excel(List<Map> list) throws Exception; |
| | | |
| | | |
| | | /** |
| | | * 分页获取流向 |
| | | * @param pageNum |
| | | * @param pageSize |
| | | * @param opeUseFlowQueryDto |
| | | * @return |
| | | */ |
| | | CommonPage<OpeUseFlow> getOpeUseFlowSimpleInfoList(Integer pageNum, Integer pageSize, OpeUseFlowQueryDto opeUseFlowQueryDto); |
| | | } |
| | |
| | | import com.hazelcast.core.IFunction; |
| | | import com.nanometer.smartlab.dao.*; |
| | | import com.nanometer.smartlab.entity.*; |
| | | import com.nanometer.smartlab.entity.dto.OpeUseFlowQueryDto; |
| | | import com.nanometer.smartlab.entity.dto.PersonUseDetail; |
| | | import com.nanometer.smartlab.entity.enumtype.OperateStatus; |
| | | import com.nanometer.smartlab.model.CommonPage; |
| | | import com.nanometer.smartlab.util.Constants; |
| | | import com.nanometer.smartlab.util.ExcelUtils; |
| | | import org.apache.commons.lang.StringUtils; |
| | |
| | | } |
| | | } |
| | | |
| | | public CommonPage<OpeUseFlow> getOpeUseFlowSimpleInfoList(Integer pageNum, Integer pageSize, OpeUseFlowQueryDto opeUseFlowQueryDto) { |
| | | CommonPage commonPage=new CommonPage(); |
| | | Map<String, Object> params = new HashMap<String, Object>(); |
| | | if(pageNum==null||pageNum<1){ |
| | | pageNum=1; |
| | | } |
| | | if(pageSize==null||pageSize<1){ |
| | | pageSize=10; |
| | | } |
| | | if(pageSize>50){ |
| | | pageSize=50;//每页最多查询50条记录 |
| | | } |
| | | commonPage.setPageNum(pageNum); |
| | | commonPage.setPageSize(pageSize); |
| | | |
| | | params.put("reagentName", opeUseFlowQueryDto.getReagentName()); |
| | | if (StringUtils.isNotBlank(opeUseFlowQueryDto.getReagentCode())) { |
| | | params.put("reagentCode", "%" + opeUseFlowQueryDto.getReagentCode() + "%"); |
| | | } |
| | | SimpleDateFormat sdfstart = new SimpleDateFormat("yyyy-MM-dd 00:00:00"); |
| | | SimpleDateFormat sdfend = new SimpleDateFormat("yyyy-MM-dd 23:59:59"); |
| | | Date now = new Date(); |
| | | Calendar cal = Calendar.getInstance(); |
| | | cal.setTime(now); |
| | | cal.add(Calendar.DATE, -7); |
| | | Date startTime = cal.getTime(); |
| | | params.put("startDate",opeUseFlowQueryDto.getStartDate()!=null?opeUseFlowQueryDto.getStartDate():sdfstart.format(startTime)); |
| | | params.put("endDate",opeUseFlowQueryDto.getEndDate()!=null?opeUseFlowQueryDto.getEndDate():sdfend.format(now)); |
| | | |
| | | params.put("houseName", opeUseFlowQueryDto.getHouseName()); |
| | | params.put("operatestate", opeUseFlowQueryDto.getOperatestate()); |
| | | params.put("containerCode", opeUseFlowQueryDto.getContainerCode()); |
| | | |
| | | params.put("first", (pageNum-1)*pageSize); |
| | | params.put("pageSize", pageSize); |
| | | |
| | | Long total= new Long(this.opeUseFlowDao.getOpeUseFlowTotalCount(params)); |
| | | commonPage.setTotalPage(CommonPage.getTotalPage(total,pageSize)); |
| | | commonPage.setTotal(total); |
| | | List<OpeUseFlow> opeUseFlows= this.opeUseFlowDao.getOpeUseFlowSimpleInfoList(params); |
| | | commonPage.setList(opeUseFlows); |
| | | return commonPage; |
| | | } |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public int getOpeUseFlowTotalCountByName(String houseName,String reagentId, String reagentCode,String containerCode, Integer status, String userId,Date startDate,Date endDate,String operatestate) { |
| | | try { |
| | |
| | | import com.nanometer.smartlab.entity.SysLaboratory; |
| | | import com.nanometer.smartlab.entity.SysLaboratoryContainer; |
| | | import com.nanometer.smartlab.entity.SysUser; |
| | | import com.nanometer.smartlab.model.CommonPage; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | List<SysLaboratoryContainer> getSysLaboratoryContainerList(String laboratoryType, String laboratoryName, String laboratoryId |
| | | ,String project,String controllerName, Integer first, Integer pageSize); |
| | | |
| | | CommonPage<SysLaboratoryContainer> getSysLaboratoryContainerList(Integer pageNum,Integer pageSize,String name,String controllerName); |
| | | List<SysLaboratoryContainer> getSysLaboratoryContainerList(String laboratoryId); |
| | | int getSysLaboratoryContainerTotalCount(String laboratoryType, String laboratoryName,String laboratoryId,String project,String controllerName); |
| | | SysLaboratoryContainer getSysLaboratoryContainer(String id); |
| | |
| | | package com.nanometer.smartlab.service; |
| | | |
| | | import java.util.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.google.common.collect.ImmutableBiMap; |
| | | import com.nanometer.smartlab.entity.*; |
| | | import com.nanometer.smartlab.entity.enumtype.ArrivalStatus; |
| | | import com.nanometer.smartlab.dao.SysLaboratoryContainerDao; |
| | | import com.nanometer.smartlab.entity.SysLaboratory; |
| | | import com.nanometer.smartlab.entity.SysLaboratoryContainer; |
| | | import com.nanometer.smartlab.exception.AlarmCode; |
| | | import com.nanometer.smartlab.exception.AlarmException; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | | import com.nanometer.smartlab.exception.ExceptionEnumCode; |
| | | import com.nanometer.smartlab.model.CommonPage; |
| | | import com.nanometer.smartlab.util.ExcelUtils; |
| | | import com.nanometer.smartlab.util.IDUtils; |
| | | import com.nanometer.smartlab.util.MessageUtil; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.log4j.Logger; |
| | | import org.springframework.dao.DataAccessException; |
| | |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import com.nanometer.smartlab.dao.SysLaboratoryContainerDao; |
| | | import com.nanometer.smartlab.exception.AlarmCode; |
| | | import com.nanometer.smartlab.exception.AlarmException; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | | import com.nanometer.smartlab.exception.ExceptionEnumCode; |
| | | import com.nanometer.smartlab.util.IDUtils; |
| | | import com.nanometer.smartlab.util.MessageUtil; |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * Created by cmower on 17/11/20. |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public CommonPage<SysLaboratoryContainer> getSysLaboratoryContainerList(Integer pageNum, Integer pageSize, String name, String controllerName) { |
| | | if(pageNum==null||pageNum<1){ |
| | | pageNum=1; |
| | | } |
| | | if(pageSize==null||pageSize<1){ |
| | | pageSize=10; |
| | | } |
| | | if(pageSize>50){ |
| | | pageSize=50; |
| | | } |
| | | Map<String, Object> params = new HashMap<>(); |
| | | if (StringUtils.isNotBlank(name)) { |
| | | params.put("laboratoryName","%" + name+ "%"); |
| | | } |
| | | if (StringUtils.isNotBlank(controllerName)) { |
| | | params.put("controllerName", "%" + controllerName + "%"); |
| | | } |
| | | params.put("first", (pageNum-1)*pageSize); |
| | | params.put("pageSize", pageSize); |
| | | CommonPage commonPage=new CommonPage(); |
| | | commonPage.setPageNum(pageNum); |
| | | commonPage.setPageSize(pageSize); |
| | | Long total=new Long(sysLaboratoryContainerDao.getSysLaboratoryContainerTotalCount(params)); |
| | | commonPage.setTotal(total); |
| | | commonPage.setTotalPage(CommonPage.getTotalPage(total,pageSize)); |
| | | List<SysLaboratoryContainer> sysReagents=sysLaboratoryContainerDao.getSysLaboratoryContainerSimpleInfoList(params); |
| | | commonPage.setList(sysReagents); |
| | | return commonPage; |
| | | |
| | | } |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public List<SysLaboratoryContainer> getSysLaboratoryContainerList( |
| | | String laboratoryId) { |
| | |
| | | |
| | | import com.nanometer.smartlab.entity.SysLaboratory; |
| | | import com.nanometer.smartlab.entity.dto.LaboratoryVo; |
| | | import com.nanometer.smartlab.model.CommonPage; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | |
| | | List<SysLaboratory> getSysLaboratoryList(String type, String name, String project, Integer first, Integer pageSize); |
| | | |
| | | CommonPage<SysLaboratory> getSysLaboratoryList(Integer pageNum, Integer pageSize, String name); |
| | | |
| | | List<SysLaboratory> getAllSysLaboratoryList(); |
| | | |
| | | List<SysLaboratory> getSysLaboratoryListByDep(String depId); |
| | |
| | | import com.nanometer.smartlab.exception.AlarmException; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | | import com.nanometer.smartlab.exception.ExceptionEnumCode; |
| | | import com.nanometer.smartlab.model.CommonPage; |
| | | import com.nanometer.smartlab.util.ExcelUtils; |
| | | import com.nanometer.smartlab.util.IDUtils; |
| | | import com.nanometer.smartlab.util.MessageUtil; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.apache.log4j.Logger; |
| | | import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
| | | import org.springframework.dao.DataAccessException; |
| | | import org.springframework.dao.DataIntegrityViolationException; |
| | | import org.springframework.dao.DuplicateKeyException; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.faces.context.FacesContext; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public CommonPage<SysLaboratory> getSysLaboratoryList(Integer pageNum, Integer pageSize, String name) { |
| | | if(pageNum==null||pageNum<1){ |
| | | pageNum=1; |
| | | } |
| | | if(pageSize==null||pageSize<1){ |
| | | pageSize=10; |
| | | } |
| | | if(pageSize>50){ |
| | | pageSize=50; |
| | | } |
| | | Map<String, Object> params = new HashMap<>(); |
| | | if(StringUtils.isNotBlank(name)){ |
| | | params.put("name","%"+name+"%"); |
| | | } |
| | | params.put("first", (pageNum-1)*pageSize); |
| | | params.put("pageSize", pageSize); |
| | | CommonPage commonPage=new CommonPage(); |
| | | commonPage.setPageNum(pageNum); |
| | | commonPage.setPageSize(pageSize); |
| | | Long total=new Long(sysLaboratoryDao.getSysLaboratoryTotalCount(params)); |
| | | commonPage.setTotal(total); |
| | | commonPage.setTotalPage(CommonPage.getTotalPage(total,pageSize)); |
| | | List<SysLaboratory> sysReagents=sysLaboratoryDao.getSysLaboratorySimpleInfoList(params); |
| | | commonPage.setList(sysReagents); |
| | | return commonPage; |
| | | } |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public int getSysLaboratoryTotalCount(String type, String name,String project) { |
| | | try { |
| | |
| | | |
| | | import com.nanometer.smartlab.entity.SysReagent; |
| | | import com.nanometer.smartlab.entity.SysUser; |
| | | import com.nanometer.smartlab.model.CommonPage; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | |
| | | |
| | | List<SysReagent> reagentList(SysUser user, String name, String cas, String supplierId, String productSn, int first, int pageSize,int count); |
| | | |
| | | CommonPage<SysReagent> reagentList(Integer pageNum, Integer pageSize, String name, String cas); |
| | | |
| | | String getReagentUnitByReagentId(String reagentId); |
| | | |
| | | List<SysReagent> getReagent(String name, String cas, String factory, String specifications, String packing); |
| | |
| | | import com.nanometer.smartlab.exception.AlarmException; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | | import com.nanometer.smartlab.exception.ExceptionEnumCode; |
| | | import com.nanometer.smartlab.model.CommonPage; |
| | | import com.nanometer.smartlab.util.ExcelUtils; |
| | | import com.nanometer.smartlab.util.IDUtils; |
| | | import com.nanometer.smartlab.util.MessageUtil; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public CommonPage<SysReagent> reagentList(Integer pageNum,Integer pageSize,String name,String cas){ |
| | | if(pageNum==null||pageNum<1){ |
| | | pageNum=1; |
| | | } |
| | | if(pageSize==null||pageSize<1){ |
| | | pageSize=10; |
| | | } |
| | | if(pageSize>50){ |
| | | pageSize=50; |
| | | } |
| | | Map<String, Object> params = new HashMap<>(); |
| | | |
| | | params.put("name",name); |
| | | params.put("cas",cas); |
| | | params.put("first", (pageNum-1)*pageSize); |
| | | params.put("pageSize", pageSize); |
| | | CommonPage commonPage=new CommonPage(); |
| | | commonPage.setPageNum(pageNum); |
| | | commonPage.setPageSize(pageSize); |
| | | Long total=new Long(sysReagentDao.reagentSimpleInfoCount(params)); |
| | | commonPage.setTotal(total); |
| | | commonPage.setTotalPage(CommonPage.getTotalPage(total,pageSize)); |
| | | List<SysReagent> sysReagents=sysReagentDao.reagentSimpleInfoList(params); |
| | | commonPage.setList(sysReagents); |
| | | return commonPage; |
| | | } |
| | | |
| | | @Override |
| | | public String getReagentUnitByReagentId(String reagentId) { |
| | | return sysReagentDao.getReagentUnitByReagentId(reagentId); |
| | | } |
| | |
| | | import com.nanometer.smartlab.entity.dto.HazardousWasteUser; |
| | | import com.nanometer.smartlab.entity.dto.LaboratoryVo; |
| | | import com.nanometer.smartlab.entity.dto.SysUserDto; |
| | | import com.nanometer.smartlab.model.CommonPage; |
| | | |
| | | import java.net.Inet4Address; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | public interface SysUserService { |
| | | |
| | | List<SysUser> getSysUserList(String arp, String name,String departmentName,String project,String company,Integer first, Integer pageSize); |
| | | |
| | | CommonPage<SysUser> getSysUserList(Integer pageNum, Integer pageSize, String name); |
| | | int getSysUserTotalCount(String arp, String name,String departmentName,String project,String company); |
| | | int getUserCountInProject(String arp, String name,String departmentName,String project,String company); |
| | | List<SysUser> getUserInProject(String arp, String name,String departmentName,String project,String company,Integer first, Integer pageSize); |
| | |
| | | |
| | | import com.google.common.collect.ImmutableMap; |
| | | import com.nanometer.smartlab.dao.SysUserDao; |
| | | import com.nanometer.smartlab.entity.SysLaboratoryContainer; |
| | | import com.nanometer.smartlab.entity.SysReagent; |
| | | import com.nanometer.smartlab.entity.SysUser; |
| | | import com.nanometer.smartlab.entity.dto.HazardousWasteUser; |
| | |
| | | import com.nanometer.smartlab.exception.AlarmException; |
| | | import com.nanometer.smartlab.exception.BusinessException; |
| | | import com.nanometer.smartlab.exception.ExceptionEnumCode; |
| | | import com.nanometer.smartlab.model.CommonPage; |
| | | import com.nanometer.smartlab.util.ExcelUtils; |
| | | import com.nanometer.smartlab.util.FacesUtils; |
| | | import com.nanometer.smartlab.util.IDUtils; |
| | |
| | | throw new BusinessException(ExceptionEnumCode.DB_ERR, MessageUtil.getMessageByCode(ExceptionEnumCode.DB_ERR.getCode()), e); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public CommonPage<SysUser> getSysUserList(Integer pageNum, Integer pageSize, String name) { |
| | | if(pageNum==null||pageNum<1){ |
| | | pageNum=1; |
| | | } |
| | | if(pageSize==null||pageSize<1){ |
| | | pageSize=10; |
| | | } |
| | | if(pageSize>50){ |
| | | pageSize=50; |
| | | } |
| | | Map<String, Object> params = new HashMap<>(); |
| | | if (StringUtils.isNotBlank(name)) { |
| | | params.put("name","%" + name+ "%"); |
| | | } |
| | | params.put("first", (pageNum-1)*pageSize); |
| | | params.put("pageSize", pageSize); |
| | | CommonPage commonPage=new CommonPage(); |
| | | commonPage.setPageNum(pageNum); |
| | | commonPage.setPageSize(pageSize); |
| | | Long total=new Long(sysUserDao.getSysUserTotalCount(params)); |
| | | commonPage.setTotal(total); |
| | | commonPage.setTotalPage(CommonPage.getTotalPage(total,pageSize)); |
| | | List<SysUser> sysReagents=sysUserDao.getSysUserSimpleInfoList(params); |
| | | commonPage.setList(sysReagents); |
| | | return commonPage; |
| | | } |
| | | |
| | | @Transactional(propagation = Propagation.REQUIRED) |
| | | public int getSysUserTotalCount(String arp, String name,String departmentName,String project,String company) { |
| | | try { |
| | |
| | | |
| | | institute.id = ${institute.id} |
| | | institute.name = ${institute.name} |
| | | institute.logo = ${institute.logo} |
| | | #institute.logo = ${institute.logo} |
| | | institute.logo = /resources/images/\u59D1\u82CF\u5B9E\u9A8C\u5BA4logo2.png |
| | | institute.url = ${institute.url} |
| | | message.url = ${message.url} |
| | | |
| | |
| | | |
| | | personImgPath = ${personImgPath} |
| | | |
| | | #activeEnv = ${envTag} |
| | | activeEnv = gslab |
| | | activeEnv = ${envTag} |
| | | |
| | |
| | | jdbc.password=Gslab@uss2021! |
| | | |
| | | institute.id = 38 |
| | | institute.name = \u6750\u6599\u79D1\u5B66\u59D1\u82CF\u5B9E\u9A8C\u5BA4 |
| | | institute.logo = /resources/images/\u6750\u6599\u79D1\u5B66\u59D1\u82CF\u5B9E\u9A8C\u5BA4logo.png |
| | | institute.name = \u59D1\u82CF\u5B9E\u9A8C\u5BA4 |
| | | institute.logo = /resources/images/\u59D1\u82CF\u5B9E\u9A8C\u5BA4logo.png |
| | | institute.url = http://222.92.16.2:18082 |
| | | institute.app.id = |
| | | institute.app.secret = |
| | | alarm.url = |
| | | reagent.detail.price.api = https://www.reagent.com.cn/reagent-front/goodsApi/getGoodsListExact |
| | | institute.copyright= Copyright\u00A92021 \u6750\u6599\u79D1\u5B66\u59D1\u82CF\u5B9E\u9A8C\u5BA4\u00A0\u82CFICP\u590720047331\u53F7-1 |
| | | institute.copyright= Copyright\u00A92021 \u59D1\u82CF\u5B9E\u9A8C\u5BA4\u00A0\u82CFICP\u590720047331\u53F7-1 |
| | | |
| | | message.url= http://aq.gusulab.ac.cn:18084/api/sendmessage |
| | | personImgPath = /opt/file/smartlab/img/ |
| | |
| | | # Root logger option |
| | | |
| | | log4j.rootLogger=INFO, file, stdout |
| | | log4j.rootLogger=DEBUG,INFO, file, stdout |
| | | log4j.logger.org.hibernate.internal.util.EntityPrinter=ERROR |
| | | |
| | | # Direct log messages to a log file |
| | |
| | | init-method="init" destroy-method="close"> |
| | | <!--mysql 5连接驱动--> |
| | | <property name="driverClassName" value="com.mysql.jdbc.Driver"></property> |
| | | <property name="url" value="jdbc:mysql://192.168.0.228:3306/smartlabdb?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false" /> |
| | | <!-- <property name="url" value="jdbc:mysql://222.92.213.22:13306/smartlabdb?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false" />--> |
| | | <!--<!– <property name="url" value="jdbc:mysql://124.221.143.185:23306/smartlb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false" />–>--> |
| | | <!-- <property name="username" value="root" />--> |
| | | <!-- <property name="password" value="Sinanoaq#415" />--> |
| | | |
| | | <!-- <property name="url" value="jdbc:mysql://124.221.143.185:23306/smartlb?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&useSSL=false" />--> |
| | | <property name="username" value="root" /> |
| | | <property name="password" value="Gslab@uss2021!" /> |
| | | <property name="url" value="${jdbc.url}" /> |
| | | <property name="username" value="${jdbc.username}" /> |
| | | <property name="password" value="${jdbc.password}" /> |
| | | <!--mysql 8连接驱动--> |
| | | <!-- <property name="driverClassName" value="com.mysql.cj.jdbc.Driver"/>--> |
| | | <!-- <property name="url" value="jdbc:mysql://127.0.0.1:3306/smartlb?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false" />--> |
| | |
| | | |
| | | |
| | | <script language="javascript" type="text/javascript"> |
| | | setTimeout("window.open('http://121.239.169.27:7000/');", 0); |
| | | setTimeout("window.open('http://aq.gusulab.ac.cn:18087/');", 0); |
| | | </script> |
| | | |
| | | </head> |