|  | @ -217,7 +217,18 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Company.message_success_find_functions,iotCompanyVOList, page, size,count);
 |  |         return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Company.message_success_find_functions,iotCompanyVOList, page, size,count);
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | /*    public MixEnvelop<IotCompanyVO, IotCompanyVO> queryPage(Integer page, Integer size, String status, String name, String type){
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |     /**
 | 
												
													
														
															|  | 
 |  |      * 条件分页查找
 | 
												
													
														
															|  | 
 |  |      * @param page
 | 
												
													
														
															|  | 
 |  |      * @param size
 | 
												
													
														
															|  | 
 |  |      * @param status
 | 
												
													
														
															|  | 
 |  |      * @param name
 | 
												
													
														
															|  | 
 |  |      * @param type
 | 
												
													
														
															|  | 
 |  |      * @return
 | 
												
													
														
															|  | 
 |  |      */
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |     public MixEnvelop<IotCompanyVO, IotCompanyVO> conditionQueryPage(Integer page, Integer size, String status, String name, String type){
 | 
												
													
														
															|  |         StringBuffer sql = new StringBuffer("SELECT DISTINCT c.* from iot_company c ,iot_company_type t WHERE c.del=1 ");
 |  |         StringBuffer sql = new StringBuffer("SELECT DISTINCT c.* from iot_company c ,iot_company_type t WHERE c.del=1 ");
 | 
												
													
														
															|  |         StringBuffer sqlCount = new StringBuffer("SELECT COUNT(DISTINCT c.id) count from iot_company c ,iot_company_type t WHERE c.del=1 ");
 |  |         StringBuffer sqlCount = new StringBuffer("SELECT COUNT(DISTINCT c.id) count from iot_company c ,iot_company_type t WHERE c.del=1 ");
 | 
												
													
														
															|  |         List<Object> args = new ArrayList<>();
 |  |         List<Object> args = new ArrayList<>();
 | 
												
											
												
													
														
															|  | @ -227,22 +238,28 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
 | 
												
													
														
															|  |             args.add(status);
 |  |             args.add(status);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         if(StringUtils.isNotBlank(name)){
 |  |         if(StringUtils.isNotBlank(name)){
 | 
												
													
														
															|  |             sql.append(" and (c.name like ? or c.contacts_name like ?)");
 |  | 
 | 
												
													
														
															|  |             sqlCount.append(" and (c.name like '").append(name).append("' or c.contacts_name like '").append(name).append("')");
 |  | 
 | 
												
													
														
															|  |             args.add(name);
 |  | 
 | 
												
													
														
															|  |             args.add(name);
 |  | 
 | 
												
													
														
															|  | 
 |  |             sql.append(" and (c.name like '%").append(name).append("%' or c.contacts_name like '%").append(name).append("%')");
 | 
												
													
														
															|  | 
 |  |             sqlCount.append(" and (c.name like '%").append(name).append("%' or c.contacts_name like '%").append(name).append("%')");
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         if(StringUtils.isNotBlank(type)){
 |  |         if(StringUtils.isNotBlank(type)){
 | 
												
													
														
															|  |             sql.append(" and c.id = t.company_id and t.type=? ");
 |  | 
 | 
												
													
														
															|  |             sqlCount.append(" and c.id = t.company_id and t.type='").append(type).append("' ");
 |  | 
 | 
												
													
														
															|  | 
 |  |             sql.append(" and c.id = t.company_id and t.type_name=? ");
 | 
												
													
														
															|  | 
 |  |             sqlCount.append(" and c.id = t.company_id and t.type_name='").append(type).append("' ");
 | 
												
													
														
															|  |             args.add(type);
 |  |             args.add(type);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         sql.append("order by c.update_time desc limit ").append((page-1)*size).append(",").append(size);
 |  |         sql.append("order by c.update_time desc limit ").append((page-1)*size).append(",").append(size);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         List<IotCompanyDO> list = jdbcTempalte.query(sql.toString(),args.toArray(),new BeanPropertyRowMapper(IotCompanyDO.class));
 |  |         List<IotCompanyDO> list = jdbcTempalte.query(sql.toString(),args.toArray(),new BeanPropertyRowMapper(IotCompanyDO.class));
 | 
												
													
														
															|  |         list.forEach(one->{
 |  | 
 | 
												
													
														
															|  |             findType(one);
 |  | 
 | 
												
													
														
															|  |         });
 |  | 
 | 
												
													
														
															|  | 
 |  |         if(StringUtils.isBlank(type)){
 | 
												
													
														
															|  | 
 |  |             //得到list数据
 | 
												
													
														
															|  | 
 |  |             list.forEach(one->{
 | 
												
													
														
															|  | 
 |  |                 findAppType(one);
 | 
												
													
														
															|  | 
 |  |             });
 | 
												
													
														
															|  | 
 |  |         }else {
 | 
												
													
														
															|  | 
 |  |             list.forEach(one->{
 | 
												
													
														
															|  | 
 |  |                 findType(one);
 | 
												
													
														
															|  | 
 |  |             });
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         List<Map<String,Object>> countList = jdbcTempalte.queryForList(sqlCount.toString());
 |  |         List<Map<String,Object>> countList = jdbcTempalte.queryForList(sqlCount.toString());
 | 
												
													
														
															|  |         long count = Long.valueOf(countList.get(0).get("count").toString());
 |  |         long count = Long.valueOf(countList.get(0).get("count").toString());
 | 
												
													
														
															|  | 
 |  | 
 | 
												
											
												
													
														
															|  | @ -250,7 +267,9 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
 | 
												
													
														
															|  |         List<IotCompanyVO> iotCompanyVOList = convertToModelVOs(list,new ArrayList<>(list.size()));
 |  |         List<IotCompanyVO> iotCompanyVOList = convertToModelVOs(list,new ArrayList<>(list.size()));
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |         return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Company.message_success_find_functions,iotCompanyVOList, page, size,count);
 |  |         return MixEnvelop.getSuccessListWithPage(IotRequestMapping.Company.message_success_find_functions,iotCompanyVOList, page, size,count);
 | 
												
													
														
															|  |     }*/
 |  | 
 | 
												
													
														
															|  | 
 |  |     }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     /**
 |  |     /**
 | 
												
													
														
															|  |      * 新增
 |  |      * 新增
 | 
												
											
												
													
														
															|  | @ -297,6 +316,7 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
 | 
												
													
														
															|  |             });
 |  |             });
 | 
												
													
														
															|  |             iotCompanyTypeDao.save(companyTypes);
 |  |             iotCompanyTypeDao.save(companyTypes);
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  | 
 |  |         //应用的营业执照号 可以相同
 | 
												
													
														
															|  |         if("0".equalsIgnoreCase(iotCompany.getAccountType())){
 |  |         if("0".equalsIgnoreCase(iotCompany.getAccountType())){
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |             List<IotCompanyDO> iotCompanyDOS = iotCompanyDao.findByAccountType(iotCompany.getAccountType());
 |  |             List<IotCompanyDO> iotCompanyDOS = iotCompanyDao.findByAccountType(iotCompany.getAccountType());
 | 
												
											
												
													
														
															|  | @ -573,7 +593,7 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
 | 
												
													
														
															|  |     public MixEnvelop auditCompany(String id) {
 |  |     public MixEnvelop auditCompany(String id) {
 | 
												
													
														
															|  |         IotCompanyDO companyDO = findById(id);
 |  |         IotCompanyDO companyDO = findById(id);
 | 
												
													
														
															|  |         if (companyDO==null){
 |  |         if (companyDO==null){
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |             return MixEnvelop.getError("无该企业");
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         String uname = userAgent.getUNAME();
 |  |         String uname = userAgent.getUNAME();
 | 
												
													
														
															|  |         if (uname==null){
 |  |         if (uname==null){
 |