productWebsocket中属性加上ebabled
| | |
| | | @RequestParam(required = false) String parentName, |
| | | @RequestParam(required = false) String parentModel, |
| | | @RequestParam(required = false) String customCode, |
| | | @RequestParam(required = false) Integer enabled, |
| | | @RequestParam int pageCurr, |
| | | @RequestParam int pageSize){ |
| | | return service.getAllProduct(subCode,parentCode,parentName,parentModel,customCode,pageCurr,pageSize); |
| | | return service.getAllProduct(subCode,parentCode,parentName,parentModel,customCode,enabled,pageCurr,pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询出所有的产品无参不分页(产品上传的是用)",notes = "9.2修改后使用") |
| | |
| | | private String parentName; |
| | | private String parentModel; |
| | | private String customCode; |
| | | private Integer enabled; |
| | | private int pageCurr; |
| | | private int pageSize; |
| | | |
| | |
| | | // 5.在product中插入设定可用的pHistory |
| | | int insertPselectPH(Integer id); |
| | | //查询出所有的产品信息(分页加模糊查询<产品的编码,型号,名字,定制表编号> |
| | | List<Product> getAllProduct(String subCode, String parentCode, String parentName, String parentModel, String customCode); |
| | | List<Product> getAllProduct(String subCode, String parentCode, String parentName, String parentModel, String customCode,Integer enabled); |
| | | //根据产品id查询被锁定的物料dwg |
| | | List<AttachLock> selectListMaterial(int productId); |
| | | //根据产品id查询被锁定的产品丝印 |
| | |
| | | private ProductLockLogService productLockLogService; |
| | | |
| | | //查询出所有的产品信息(分页加模糊查询<产品的编码,型号,名字,定制表编号> |
| | | public Response getAllProduct(String subCode,String parentCode, String parentName, String parentModel, String customCode, int pageCurr, int pageSize) { |
| | | public Response getAllProduct(String subCode,String parentCode, String parentName, String parentModel, String customCode,Integer enabled, int pageCurr, int pageSize) { |
| | | PageHelper.startPage(pageCurr,pageSize); |
| | | /*QueryWrapper wrapper=new QueryWrapper(); |
| | | if(parentCode!=null){ |
| | |
| | | } |
| | | wrapper.orderByAsc("id"); |
| | | List list=mapper.selectList(wrapper);*/ |
| | | List<Product> list=mapper.getAllProduct(subCode,parentCode,parentName,parentModel,customCode); |
| | | list.stream().forEach(product -> { |
| | | List<Product> list=mapper.getAllProduct(subCode,parentCode,parentName,parentModel,customCode,enabled); |
| | | /*list.stream().forEach(product -> { |
| | | //1.查询是否存在该记录 |
| | | QueryWrapper qwrapper=new QueryWrapper(); |
| | | qwrapper.eq("id",product.getId()); |
| | | qwrapper.last("limit 1"); |
| | | ProductHistory pHis=hisMapper.selectOne(qwrapper); |
| | | product.setEnabled(pHis.getEnabled()); |
| | | }); |
| | | });*/ |
| | | PageInfo pageInfo=new PageInfo(list); |
| | | return new Response().setII(1,list.size()>0,pageInfo,"返回产品信息"); |
| | | } |
| | |
| | | Thread thread = currentThread(); |
| | | threadFlagMap.put(thread.getId(), true); |
| | | try { |
| | | Response res = productService.getAllProduct(productDto.getSubCode(),productDto.getParentCode(),productDto.getParentName(),productDto.getParentModel(),productDto.getCustomCode(),productDto.getPageCurr(),productDto.getPageSize()); |
| | | Response res = productService.getAllProduct(productDto.getSubCode(),productDto.getParentCode(),productDto.getParentName(),productDto.getParentModel(),productDto.getCustomCode(),productDto.getEnabled(),productDto.getPageCurr(),productDto.getPageSize()); |
| | | if (session.isOpen()) { |
| | | //推送信息 |
| | | synchronized (session) { |
| | |
| | | <result property="createTime" column="create_time"></result> |
| | | <result property="versionTime" column="version_time"></result> |
| | | <result property="version" column="version"></result> |
| | | <result property="enabled" column="enabled"></result> |
| | | <result property="notes" column="notes"></result> |
| | | <collection property="ecrList" javaType="java.util.ArrayList" ofType="com.whyc.pojo.ECR" column="{subCode=parent_code}" select="selectEcrProduct"> |
| | | </collection> |
| | | </resultMap> |
| | | <select id="getAllProduct" resultMap="ProductErcList"> |
| | | select distinct tb_product.* from tb_product,tb_product_bom,tb_material |
| | | select distinct tb_product.*,tb_product_history.enabled from tb_product,tb_product_bom,tb_material,tb_product_history |
| | | <where> |
| | | tb_product.id=tb_product_bom.product_id |
| | | and tb_product_bom.material_id=tb_material.id |
| | | and tb_product.id=tb_product_history.id |
| | | <if test="subCode!=null"> |
| | | and sub_code like '%${subCode}%' |
| | | and tb_material.sub_code like '%${subCode}%' |
| | | </if> |
| | | <if test="parentCode!=null"> |
| | | and parent_code like '%${parentCode}%' |
| | | and tb_product.parent_code like '%${parentCode}%' |
| | | </if> |
| | | <if test="parentName!=null"> |
| | | and parent_name like '%${parentName}%' |
| | | and tb_product.parent_name like '%${parentName}%' |
| | | </if> |
| | | <if test="parentModel!=null"> |
| | | and parent_model like '%${parentModel}%' |
| | | and tb_product.parent_model like '%${parentModel}%' |
| | | </if> |
| | | <if test="customCode!=null"> |
| | | <if test="customCode==''"> |
| | | and custom_code=#{customCode} |
| | | and tb_product.custom_code=#{customCode} |
| | | </if> |
| | | <if test="customCode!=''"> |
| | | and custom_code like '%${customCode}%' |
| | | and tb_product.custom_code like '%${customCode}%' |
| | | </if> |
| | | </if> |
| | | <if test="enabled!=null"> |
| | | and tb_product_history.enabled=#{enabled} |
| | | </if> |
| | | </where> |
| | | order by tb_product.version_time desc |
| | | </select> |